export class PermissionOverwriteManager extends CachedManager<Snowflake, PermissionOverwrites, PermissionOverwriteResolvable>

Manages API methods for guild channel permission overwrites and stores their cache.

readonly
cache : Collection<Key, Holds>

The cache of items for this manager.

Inherited from: DataManager

channel : GuildChannel

The channel of the permission overwrite this manager belongs to

readonly
client : Client

The client that instantiated this Manager

Inherited from: BaseManager

readonly
holds : Constructable<Holds>

The data structure belonging to this manager.

Inherited from: DataManager

Creates permission overwrites for a user or role in this channel, or replaces them if already present.

Examples:
// Create or Replace permission overwrites for a message author
message.channel.permissionOverwrites.create(message.author, {
  SendMessages: false
})
  .then(channel => console.log(channel.permissionOverwrites.cache.get(message.author.id)))
  .catch(console.error);

Deletes permission overwrites for a user or role in this channel.

Edits permission overwrites for a user or role in this channel, or creates an entry if not already present.

Examples:
// Edit or Create permission overwrites for a message author
message.channel.permissionOverwrites.edit(message.author, {
  SendMessages: false
})
  .then(channel => console.log(channel.permissionOverwrites.cache.get(message.author.id)))
  .catch(console.error);

resolve(
idOrInstance: Holds
) : Holds

Resolves a data entry to a data Object.

Returns: An instance from this Manager

resolveId(
idOrInstance: Key | Holds
) : Key

Resolves a data entry to an instance id.

Replaces the permission overwrites in this channel.

Examples:
message.channel.permissionOverwrites.set([
  {
     id: message.author.id,
     deny: [PermissionFlagsBits.ViewChannel],
  },
], 'Needed to change permissions');

valueOf() : Collection<Key, Holds>

Inherited from: DataManager