mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
types: remove entire types (#684)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { cache } from "../cache.ts";
|
||||
import { deleteRole } from "../helpers/roles/delete_role.ts";
|
||||
import { editRole } from "../helpers/roles/edit_role.ts";
|
||||
import { CreateRoleOptions, RoleData } from "../types/mod.ts";
|
||||
import { Collection } from "../util/collection.ts";
|
||||
import { createNewProp } from "../util/utils.ts";
|
||||
import { Guild } from "./guild.ts";
|
||||
@@ -84,48 +83,3 @@ export async function createRoleStruct({ tags = {}, ...rest }: RoleData) {
|
||||
|
||||
return role as Role;
|
||||
}
|
||||
|
||||
export interface Role {
|
||||
/** role id */
|
||||
id: string;
|
||||
/** role name */
|
||||
name: string;
|
||||
/** integer representation of hexadecimal color code */
|
||||
color: number;
|
||||
/** if this role is pinned in the user listing */
|
||||
hoist: boolean;
|
||||
/** position of this role */
|
||||
position: number;
|
||||
/** permission bit set */
|
||||
permissions: string;
|
||||
/** whether this role is managed by an integration */
|
||||
managed: boolean;
|
||||
/** whether this role is mentionable */
|
||||
mentionable: boolean;
|
||||
/** The bot id that is associated with this role. */
|
||||
botID?: string;
|
||||
/** If this role is the nitro boost role. */
|
||||
isNitroBoostRole: boolean;
|
||||
/** The integration id that is associated with this role */
|
||||
integrationID: string;
|
||||
|
||||
// GETTERS
|
||||
|
||||
/** The guild where this role is. If undefined, the guild is not cached */
|
||||
guild?: Guild;
|
||||
/** The hex color for this role. */
|
||||
hexColor: string;
|
||||
/** The cached members that have this role */
|
||||
members: Collection<string, Member>;
|
||||
/** The @ mention of the role in a string. */
|
||||
mention: string;
|
||||
|
||||
// METHODS
|
||||
|
||||
/** Delete the role */
|
||||
delete(guildID?: string): ReturnType<typeof deleteRole>;
|
||||
/** Edits the role */
|
||||
edit(options: CreateRoleOptions): ReturnType<typeof editRole>;
|
||||
/** Checks if this role is higher than another role. */
|
||||
higherThanRoleID(roleID: string, position?: number): boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user