Method AddOverwriteAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
AddOverwriteAsync(DiscordRole, Permissions, Permissions, string)
Adds a channel permission overwrite for specified role.
public Task AddOverwriteAsync(DiscordRole role, Permissions allow = Permissions.None, Permissions deny = Permissions.None, string reason = null)
Parameters
role
DiscordRoleThe role to have the permission added.
allow
PermissionsThe permissions to allow.
deny
PermissionsThe permissions to deny.
reason
stringReason for audit logs.
Returns
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageRoles permission.
- NotFoundException
Thrown when the channel does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.
AddOverwriteAsync(DiscordMember, Permissions, Permissions, string)
Adds a channel permission overwrite for specified member.
public Task AddOverwriteAsync(DiscordMember member, Permissions allow = Permissions.None, Permissions deny = Permissions.None, string reason = null)
Parameters
member
DiscordMemberThe member to have the permission added.
allow
PermissionsThe permissions to allow.
deny
PermissionsThe permissions to deny.
reason
stringReason for audit logs.
Returns
Exceptions
- UnauthorizedException
Thrown when the client does not have the ManageRoles permission.
- NotFoundException
Thrown when the channel does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.