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
ulongThe 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
DiscordUserThe user to get the ban for.
Returns
- Task<DiscordBan>
The requested ban object.
Exceptions
- NotFoundException
Thrown when the specified user is not banned.