Table of Contents

Method GetBanAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

GetBanAsync(ulong)

Gets a ban for a specific user.

public Task<DiscordBan> GetBanAsync(ulong userId)

Parameters

userId ulong

The Id of the user to get the ban for.

Returns

Task<DiscordBan>

The requested ban object.

Exceptions

NotFoundException

Thrown when the specified user is not banned.

GetBanAsync(DiscordUser)

Gets a ban for a specific user.

public Task<DiscordBan> GetBanAsync(DiscordUser user)

Parameters

user DiscordUser

The user to get the ban for.

Returns

Task<DiscordBan>

The requested ban object.

Exceptions

NotFoundException

Thrown when the specified user is not banned.