Passa al contenuto principale

Server invites

Actions in the category "Server invites".

Create invite​

Creates an invite for a channel.

Required permissions: Manage server.

Inputs

NameTypeRequiredDetails
ChannelServer channelYesChannel the invite leads to.
Max ageDurationYesHow long the invite remains valid (0 = never expires). Value: 0 to 604800000. Default: 86400000.
Max usesWhole numberYesHow many times the invite may be used (0 = unlimited). Value: 0 to 100. Default: 0.
TemporaryYes/NoYesKick members on disconnect if they have no role. Default: No.
UniqueYes/NoYesAlways create a fresh code, never reuse an existing one. Default: No.

Outputs

NameTypeDetails
InviteInviteThe created invite.

Fetch vanity URL data​

Look up the current vanity invite code and its use count.

Outputs

NameTypeDetails
Vanity codeTextThe current vanity code, if any. May be empty.
UsesWhole numberHow many times the vanity code has been used.

Delete invite​

Revoke an existing invite link.

Required permissions: Manage server.

Inputs

NameTypeRequiredDetails
InviteInviteYesThe invite to revoke.
Audit log reasonTextNoReason shown in the audit log. Maximum length: 512 characters.

Outputs

NameTypeDetails
InviteInviteThe revoked invite.

Fetch invite by code​

Look up an invite by its code.

Inputs

NameTypeRequiredDetails
CodeTextYesThe invite code (the part after discord.gg/).
Include countsYes/NoNoWhether to include approximate member and presence counts. Default: No.
Include expirationYes/NoNoWhether to include the invite's expiration time. Default: No.

Outputs

NameTypeDetails
InviteInviteThe invite, or empty if not found. May be empty.

Fetch server invites​

List all active invites in a server.

Required permissions: Manage server.

Outputs

NameTypeDetails
InvitesList of InviteAll active invites.

Fetch vanity invite​

Look up the server's vanity invite, if it has one.

Required permissions: Manage server.

Outputs

NameTypeDetails
InviteInviteThe vanity invite, or empty. May be empty.
Need more help?
Can't find what you're looking for? Our team is happy to help.