Table of Contents

Method TryGetInviteByCode

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

TryGetInviteByCode(string, out DiscordInvite?, bool?, bool?, ulong?)

Tries to get an invite.

public bool TryGetInviteByCode(string code, out DiscordInvite? invite, bool? withCounts = null, bool? withExpiration = null, ulong? scheduledEventId = null)

Parameters

code string

The invite code.

invite DiscordInvite

The invite, if found.

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

bool

True if the invite was found, otherwise false.