Preview environment

class PermissionOverwrites

extends

Base
export class PermissionOverwrites extends Base

Represents a permission overwrite for a role or member in a guild channel.

The permissions that are allowed for the user or role.

readonly
channel : NonThreadGuildBasedChannel

The GuildChannel this overwrite is for

readonly
client : Client<true>

The client that instantiated this

Inherited from: Base

The permissions that are denied for the user or role.

The overwrite's id, either a User or a Role id

The type of this overwrite

delete(
reason?: string
) : Promise<PermissionOverwrites>

Deletes this Permission Overwrite.

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
resolve(
guild: Guild
) : APIOverwrite

Resolves an overwrite into APIOverwrite.

static
resolveOverwriteOptions(
initialPermissions: { allow?: PermissionResolvable; deny?: PermissionResolvable }
) : ResolvedOverwriteOptions

Resolves bitfield permissions overwrites from an object.

toJSON() : unknown

valueOf() : string

Inherited from: Base