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
codestringThe invite code.
inviteDiscordInviteThe invite, if found.
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
- bool
True if the invite was found, otherwise false.