Method GetInviteByCodeAsync
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
GetInviteByCodeAsync(string, bool?, ulong?, bool?)
Gets an invite.
public Task<DiscordInvite> GetInviteByCodeAsync(string code, bool? withCounts = null, ulong? scheduledEventId = null, bool? withPermissions = null)
Parameters
codestringThe invite code.
withCountsbool?Whether to include presence and total member counts in the returned invite.
scheduledEventIdulong?The scheduled event id.
withPermissionsbool?Whether to include the invite's permissions.
Returns
- Task<DiscordInvite>
The requested invite.
Exceptions
- NotFoundException
Thrown when the invite does not exist.
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.