Skip to content

PermissionOverwrite

PermissionOverwrite ⇐ Base

Represents a permission overwrite for a channel in Discord.

Kind: global class
Extends: Base

new PermissionOverwrite([data], channelId, client)

Constructs a new instance of the Overwrite class.

ParamTypeDescription
[data]ObjectThe data for the permission overwrite.
channelIdstringThe ID of the channel that the permission overwrite belongs to.
clientClientThe client instance.

permissionOverwrite.channel ⇒

Retrieves the channel object associated with this instance.

Kind: instance property of PermissionOverwrite
Returns: The channel object.

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.

ParamTypeDescription
reasonstringThe reason for deleting the permission overwrite.