fetchInvite
- async fetchInvite(
- code: string,
- options: { guildScheduledEventId?: string; withCounts?: boolean; withExpiration?: boolean; }
Fetches an invite by its code. Pass only the code portion of an invite URL. For
https://discord.gg/hTKzmak, the code is"hTKzmak". Returnsnullwhen the invite is invalid or expired.- Parameters:
code — – The part after
discord.gg/.options — – Options controlling which approximate counts and expiration fields Discord includes.
Invite | null>