Table of Contents

Method UnbanAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

UnbanAsync(DiscordGuild, string)

Unbans this user from a guild.

public Task UnbanAsync(DiscordGuild guild, string reason = null)

Parameters

guild DiscordGuild

Guild to unban this user from.

reason string

Reason for audit logs.

Returns

Task

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.