PermissionOverwriteManager

export class PermissionOverwriteManager extends CachedManager<
Snowflake,
PermissionOverwrites,
PermissionOverwriteResolvable
>
export class PermissionOverwriteManager extends CachedManager<
Snowflake,
PermissionOverwrites,
PermissionOverwriteResolvable
>
Manages API methods for guild channel permission overwrites and stores their cache.
Readonly
cache:Collection<K, Holds>
The cache of items for this manager.
Inherited from DataManager
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
create(userOrRole, options, overwriteOptions?):Promise<NonThreadGuildBasedChannel>
Creates permission overwrites for a user or role in this channel, or replaces them if already present.
NameTypeOptionalDescription
userOrRoleRoleResolvable | UserResolvableNoThe user or role to update
optionsPermissionOverwriteOptionsNoThe options for the update
overwriteOptionsGuildChannelOverwriteOptionsYesThe extra information for the update
delete(userOrRole, reason?):Promise<NonThreadGuildBasedChannel>
Deletes permission overwrites for a user or role in this channel.
NameTypeOptionalDescription
userOrRoleRoleResolvable | UserResolvableNoThe user or role to delete
reasonstringYesThe reason for deleting the overwrite
edit(userOrRole, options, overwriteOptions?):Promise<NonThreadGuildBasedChannel>
Edits permission overwrites for a user or role in this channel, or creates an entry if not already present.
NameTypeOptionalDescription
userOrRoleRoleResolvable | UserResolvableNoThe user or role to update
optionsPermissionOverwriteOptionsNoThe options for the update
overwriteOptionsGuildChannelOverwriteOptionsYesThe extra information for the update
resolve(idOrInstance):Holds
Resolves a data entry to a data Object.
Returns
An instance from this Manager
NameTypeOptionalDescription
idOrInstanceHoldsNoThe id or instance of something in this Manager
resolveId(idOrInstance):K
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceK | HoldsNoThe id or instance of something in this Manager
set(overwrites, reason?):Promise<NonThreadGuildBasedChannel>
Replaces the permission overwrites in this channel.
NameTypeOptionalDescription
overwritesreadonly OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>NoPermission overwrites the channel gets updated with
reasonstringYesReason for updating the channel overwrites
valueOf():Collection<K, Holds>