Table of Contents

Method TryGetBanAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

TryGetBanAsync(ulong)

Tries to get a ban for a specific user.

public Task<DiscordBan?> TryGetBanAsync(ulong userId)

Parameters

userId ulong

The Id of the user to get the ban for.

Returns

Task<DiscordBan>

The requested ban object or null if not found.

TryGetBanAsync(DiscordUser)

Tries to get a ban for a specific user.

public Task<DiscordBan?> TryGetBanAsync(DiscordUser user)

Parameters

user DiscordUser

The user to get the ban for.

Returns

Task<DiscordBan>

The requested ban object or null if not found.