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
ulongThe 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
DiscordUserThe user to get the ban for.
Returns
- Task<DiscordBan>
The requested ban object or null if not found.