Table of Contents

Method GetInviteByCodeAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

GetInviteByCodeAsync(string, bool?, bool?, ulong?)

Gets an invite.

public Task<DiscordInvite> GetInviteByCodeAsync(string code, bool? withCounts = null, bool? withExpiration = null, ulong? scheduledEventId = null)

Parameters

code string

The invite code.

withCounts bool?

Whether to include presence and total member counts in the returned invite.

withExpiration bool?

Whether to include the expiration date in the returned invite.

scheduledEventId ulong?

The scheduled event id.

Returns

Task<DiscordInvite>

The requested invite.

Exceptions

NotFoundException

Thrown when the invite does not exists.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.