Table of Contents

Method GetBansAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

GetBansAsync(int?, ulong?, ulong?)

Gets the bans for this guild.

public Task<IReadOnlyList<DiscordBan>> GetBansAsync(int? limit = null, ulong? before = null, ulong? after = null)

Parameters

limit int?

The number of users to return (up to maximum 1000, default 1000).

before ulong?

Consider only users before the given user id.

after ulong?

Consider only users after the given user id.

Returns

Task<IReadOnlyList<DiscordBan>>

Collection of bans in this guild.

Exceptions

UnauthorizedException

Thrown when the client does not have the BanMembers permission.

ServerErrorException

Thrown when Discord is unable to process the request.