class PermissionOverwrites
extends
Baseexport class PermissionOverwrites extends Base
Represents a permission overwrite for a role or member in a guild channel.
Readonly<PermissionsBitField> allow :
The permissions that are allowed for the user or role.
readonlyNonThreadGuildBasedChannel channel :
The GuildChannel this overwrite is for
Readonly<PermissionsBitField> deny :
The permissions that are denied for the user or role.
OverwriteType type :
The type of this overwrite
deletereason?: string) : Promise<PermissionOverwrites> (
reason?: string
Deletes this Permission Overwrite.
editoptions: PermissionOverwriteOptionsreason?: string) : Promise<PermissionOverwrites> (
options: PermissionOverwriteOptions
reason?: string
Edits this Permission Overwrite.
Examples:
// Update permission overwrites
permissionOverwrites.edit({
SendMessages: false
})
.then(channel => console.log(channel.permissionOverwrites.get(message.author.id)))
.catch(console.error);
static resolveoverwrite: OverwriteResolvableguild: Guild) : APIOverwrite (
overwrite: OverwriteResolvable
guild: Guild
static resolveOverwriteOptionsoptions: PermissionOverwriteOptionsinitialPermissions: { allow?: PermissionResolvable; deny?: PermissionResolvable }) : ResolvedOverwriteOptions (
options: PermissionOverwriteOptions
initialPermissions: { allow?: PermissionResolvable; deny?: PermissionResolvable }
Resolves bitfield permissions overwrites from an object.