Class Role

Represents a role in a guild.

Hierarchy

Constructors

  • Parameters

    Returns Role

Properties

_cachedGuild?: any
color: number

The color of this role.

guildID: string

The id of the guild this role is in.

hoist: boolean

If this role is hoisted.

icon: null | string

The icon has of this role.

id: string
managed: boolean

If this role is managed by an integration.

mentionable: boolean

If this role can be mentioned by anybody.

name: string

The name of this role.

permissions: Permission

The permissions of this role.

position: number

The position of this role.

tags: RoleTags

The tags of this role.

unicodeEmoji: null | string

The unicode emoji of this role.

Accessors

  • get createdAt(): Date
  • Returns Date

  • get guild(): Guild
  • The guild this role is in. This will throw an error if the guild is not cached.

    Returns Guild

  • get mention(): string
  • A string that will mention this role.

    Returns string

Methods

  • Delete this role.

    Parameters

    • Optional reason: string

      The reason for deleting the role.

    Returns Promise<void>

  • Edit this role.

    Parameters

    Returns Promise<Role>

  • Returns JSONRole

  • Returns string

  • Parameters

    Returns void

  • Parameters

    • Optional timestamp: number | Date

    Returns string

  • Parameters

    • id: string

    Returns Date

  • Parameters

    • id: string

    Returns number

Generated using TypeDoc