/** * The data for a role. * @typedef {Object} RoleData * @property {string} [name] The name of the role * @property {boolean} [hoist] Whether or not the role should be hoisted * @property {number} [position] The position of the role * @property {Permission|number} [permissions] The permissions of the role * @property {boolean} [mentionable] Whether or not the role should be mentionable */ import type { Client } from '../client/Client'; import { Permission } from '../utils/Permission'; import { DataManager } from './DataManager'; import type { Guild } from './Guild'; export interface RoleData { name?: string; color?: number; hoist?: boolean; position?: number; permissions?: Permission | bigint; mentionable?: boolean; } /** * Represents a Role on Discord */ declare class Role extends DataManager { name: string; id: string; mentionable: boolean; managed: boolean; position: number; permissions: Permission; guild: Guild; constructor(client: Client, data: any, guild: Guild); /** * Edits the role * @param {RoleData} data The new data for the role * @param {string} [reason] Reason for editing this role * @returns {Promise} */ edit(options: RoleData, reason?: string): Promise; /** * Deletes this role * @returns {Promise} */ delete(): Promise; /** * Changes the name of the role * @param {string} name - The new name of the role * @returns {Promise} */ setName(name: string): Promise; /** * Sets whether the role should be displayed separately in the sidebar * @param {boolean} [hoist=true] * @returns {Promise} */ setHoist(hoist?: boolean): Promise; /** * Sets whether the role should be mentionable * @param {boolean} [mentionable=true] * @returns {Promise} */ setMentionable(mentionable?: boolean): Promise; /** * When concatenated with a string, this automatically returns the role's mention instead of the Role object * @returns {string} */ toString(): string; parseData(data: any): any; _update(data: any): Role; } export { Role }; //# sourceMappingURL=Role.d.ts.map