Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Role

Hierarchy

Index

Constructors

constructor

Properties

color

color: number

createdAt

createdAt: number

guild

guild: Guild

hoist

hoist: boolean

icon

icon: null | string

iconURL

iconURL: null | string

id

id: string

json

json: Partial<Record<"createInstantInvite" | "kickMembers" | "banMembers" | "administrator" | "manageChannels" | "manageGuild" | "addReactions" | "viewAuditLog" | "viewAuditLogs" | "voicePrioritySpeaker" | "voiceStream" | "stream" | "viewChannel" | "readMessages" | "sendMessages" | "sendTTSMessages" | "manageMessages" | "embedLinks" | "attachFiles" | "readMessageHistory" | "mentionEveryone" | "useExternalEmojis" | "externalEmojis" | "viewGuildInsights" | "voiceConnect" | "voiceSpeak" | "voiceMuteMembers" | "voiceDeafenMembers" | "voiceMoveMembers" | "voiceUseVAD" | "changeNickname" | "manageNicknames" | "manageRoles" | "manageWebhooks" | "manageEmojisAndStickers" | "manageEmojis" | "useApplicationCommands" | "useSlashCommands" | "voiceRequestToSpeak" | "manageEvents" | "manageThreads" | "createPublicThreads" | "createPrivateThreads" | "useExternalStickers" | "sendMessagesInThreads" | "startEmbeddedActivities" | "moderateMembers", boolean>>

managed

managed: boolean

mention

mention: string

mentionable

mentionable: boolean

name

name: string

permissions

permissions: Permission

position

position: number

Optional tags

tags: RoleTags

unicodeEmoji

unicodeEmoji: null | string

Methods

delete

  • delete(reason?: string): Promise<void>
  • Parameters

    • Optional reason: string

    Returns Promise<void>

edit

  • Parameters

    Returns Promise<Role>

editPosition

  • editPosition(position: number): Promise<void>
  • Parameters

    • position: number

    Returns Promise<void>

inspect

  • Returns Role

toJSON

  • Parameters

    • Optional props: string[]

    Returns JSONCache

toString

  • toString(): string
  • Returns string

Static getCreatedAt

  • getCreatedAt(id: string): number
  • Parameters

    • id: string

    Returns number

Static getDiscordEpoch

  • getDiscordEpoch(id: string): number
  • Parameters

    • id: string

    Returns number

Generated using TypeDoc