Method DeleteOverwriteAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
DeleteOverwriteAsync(DiscordMember, string)
Deletes a channel permission overwrite for the specified member.
public Task DeleteOverwriteAsync(DiscordMember member, string reason = null)
Parameters
member
DiscordMemberThe member to have the permission deleted.
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.
DeleteOverwriteAsync(DiscordRole, string)
Deletes a channel permission overwrite for the specified role.
public Task DeleteOverwriteAsync(DiscordRole role, string reason = null)
Parameters
role
DiscordRoleThe role to have the permission deleted.
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.