Members
allow :Readonly.<Permissions>
The permissions that are allowed for the user or role.
Type:
- Readonly.<Permissions>
(readonly) channel :GuildChannel
The GuildChannel this overwrite is for
Type:
deny :Readonly.<Permissions>
The permissions that are denied for the user or role.
Type:
- Readonly.<Permissions>
id :Snowflake
The ID of this overwrite, either a user ID or a role ID
Type:
type :OverwriteType
The type of this overwrite
Type:
Methods
(static) resolve(overwrite, guild) → {RawOverwriteData}
Resolves an overwrite into RawOverwriteData.
Parameters:
Name | Type | Description |
---|---|---|
overwrite |
OverwriteResolvable | The overwrite-like data to resolve |
guild |
Guild | The guild to resolve from |
Returns:
- Type
- RawOverwriteData
(static) resolveOverwriteOptions(options, initialPermissions) → {ResolvedOverwriteOptions}
Resolves bitfield permissions overwrites from an object.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
PermissionOverwriteOptions | The options for the update | |||||||||
initialPermissions |
Object | The initial permissions
Properties
|
Returns:
delete(reasonopt) → {Promise.<PermissionOverwrites>}
Deletes this Permission Overwrite.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
reason |
string |
<optional> |
Reason for deleting this overwrite |
Returns:
- Type
- Promise.<PermissionOverwrites>
update(options, reasonopt) → {Promise.<PermissionOverwrites>}
Updates this permissionOverwrites.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
PermissionOverwriteOptions | The options for the update | |
reason |
string |
<optional> |
Reason for creating/editing this overwrite |
Returns:
- Type
- Promise.<PermissionOverwrites>
Example
// Update permission overwrites
permissionOverwrites.update({
SEND_MESSAGES: false
})
.then(channel => console.log(channel.permissionOverwrites.get(message.author.id)))
.catch(console.error);