PermissionOverwriteManager
Defined in: packages/managers/src/guild-resources.ts:338
Manages a channel’s permission overwrites.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PermissionOverwriteManager(
rest,channelId,current?):PermissionOverwriteManager
Defined in: packages/managers/src/guild-resources.ts:344
Parameters
Section titled “Parameters”channelId
Section titled “channelId”string
current?
Section titled “current?”() => readonly APIOverwrite[] | undefined
The channel’s cached overwrites, read by update; the channel is fetched when they are unknown.
Returns
Section titled “Returns”PermissionOverwriteManager
Properties
Section titled “Properties”channelId
Section titled “channelId”
readonlychannelId:string
Defined in: packages/managers/src/guild-resources.ts:341
Methods
Section titled “Methods”edit()
Section titled “edit()”edit(
overwriteId,options):Promise<void>
Defined in: packages/managers/src/guild-resources.ts:393
Creates or replaces the overwrite for a role or member.
Parameters
Section titled “Parameters”overwriteId
Section titled “overwriteId”string
options
Section titled “options”Returns
Section titled “Returns”Promise<void>
remove()
Section titled “remove()”remove(
overwriteId,reason?):Promise<void>
Defined in: packages/managers/src/guild-resources.ts:409
Deletes the overwrite for a role or member.
Parameters
Section titled “Parameters”overwriteId
Section titled “overwriteId”string
reason?
Section titled “reason?”string
Returns
Section titled “Returns”Promise<void>
update()
Section titled “update()”update(
overwriteId,changes,options?):Promise<void>
Defined in: packages/managers/src/guild-resources.ts:360
Changes some bits of one overwrite and keeps the rest – unlike
edit, which replaces the whole overwrite. Creates the overwrite
when there is none (then options.type is required).
Parameters
Section titled “Parameters”overwriteId
Section titled “overwriteId”string
changes
Section titled “changes”options?
Section titled “options?”reason?
Section titled “reason?”string
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”When the overwrite does not exist and no type is given.