Table of Contents

Method TryGetInviteByCode

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

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

Tries to get an invite.

public bool TryGetInviteByCode(string code, out DiscordInvite? invite, bool? withCounts = null, ulong? scheduledEventId = null, bool? withPermissions = 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.

scheduledEventId ulong?

The scheduled event id.

withPermissions bool?

Whether to include the invite's permissions.

Returns

bool

True if the invite was found, otherwise false.