Method UnbanAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
UnbanAsync(DiscordGuild, string?)
Unbans this user from a guild.
public Task UnbanAsync(DiscordGuild guild, string? reason = null)
Parameters
guild
DiscordGuildGuild to unban this user from.
reason
stringReason for audit logs.
Returns
Exceptions
- UnauthorizedException
Thrown when the client does not have the BanMembers permission.
- NotFoundException
Thrown when the user does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.