Method GetBanAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.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.