ApplicationCommandPermission
ApplicationCommandPermission ⇐ Base
Section titled “ApplicationCommandPermission ⇐ Base”Represents an application command permission.
Kind: global class
Extends: Base
- ApplicationCommandPermission ⇐
Base- new ApplicationCommandPermission([data], guildId, client)
- instance
- .command ⇒
- .guild ⇒
- .fetch([options]) ⇒
Promise
- static
- .transformPermissions(permissions) ⇒
Object
- .transformPermissions(permissions) ⇒
new ApplicationCommandPermission([data], guildId, client)
Section titled “new ApplicationCommandPermission([data], guildId, client)”Constructs a new instance of the CommandPermissions class.
| Param | Type | Description |
|---|---|---|
| [data] | Object | The data object containing the command permission information. |
| guildId | string | The ID of the guild the command permission belongs to. |
| client | Client | The client instance. |
applicationCommandPermission.command ⇒
Section titled “applicationCommandPermission.command ⇒”Retrieves the command associated with this instance.
Kind: instance property of ApplicationCommandPermission
Returns: The command object if found, otherwise null.
applicationCommandPermission.guild ⇒
Section titled “applicationCommandPermission.guild ⇒”Retrieves the guild associated with this guildId.
Kind: instance property of ApplicationCommandPermission
Returns: The guild object if found, otherwise null.
applicationCommandPermission.fetch([options]) ⇒ Promise
Section titled “applicationCommandPermission.fetch([options]) ⇒ Promise”Fetches the permissions for the guild commands.
Kind: instance method of ApplicationCommandPermission
Returns: Promise - - A promise that resolves to the fetched permissions.
| Param | Type | Description |
|---|---|---|
| [options] | Object | Optional parameters for the fetch request. |
ApplicationCommandPermission.transformPermissions(permissions) ⇒ Object
Section titled “ApplicationCommandPermission.transformPermissions(permissions) ⇒ Object”Transforms a permissions object into a formatted object with specific properties.
Kind: static method of ApplicationCommandPermission
Returns: Object - - The transformed permissions object.
| Param | Type | Description |
|---|---|---|
| permissions | Object | The permissions object to transform. |