PermissionOverwrite
PermissionOverwrite ⇐ Base
Section titled “PermissionOverwrite ⇐ Base”Represents a permission overwrite for a channel in Discord.
Kind: global class
Extends: Base
- PermissionOverwrite ⇐
Base- new PermissionOverwrite([data], channelId, client)
- .channel ⇒
- .delete(reason) ⇒
Promise.<boolean>
new PermissionOverwrite([data], channelId, client)
Section titled “new PermissionOverwrite([data], channelId, client)”Constructs a new instance of the Overwrite class.
| Param | Type | Description |
|---|---|---|
| [data] | Object | The data for the permission overwrite. |
| channelId | string | The ID of the channel that the permission overwrite belongs to. |
| client | Client | The client instance. |
permissionOverwrite.channel ⇒
Section titled “permissionOverwrite.channel ⇒”Retrieves the channel object associated with this instance.
Kind: instance property of PermissionOverwrite
Returns: The channel object.
permissionOverwrite.delete(reason) ⇒ Promise.<boolean>
Section titled “permissionOverwrite.delete(reason) ⇒ Promise.<boolean>”Deletes the permission overwrite for this channel.
Kind: instance method of PermissionOverwrite
Returns: Promise.<boolean> - - A promise that resolves to true if the deletion was successful, or false otherwise.
| Param | Type | Description |
|---|---|---|
| reason | string | The reason for deleting the permission overwrite. |