Delete an Invite
Delete an Invite revokes an invite link, like a leaked link or the end of a campaign. Nobody can join with it afterwards. The Invite Tracker module's /invites campaign uses it to end a campaign.
Which invite
- Invite code or link: a code like
abc123, or a link likediscord.gg/abc123. Variables work, like{option_invite}. - Reason: optional, in Advanced. Shown in your server's audit log. Up to 512 characters.
The bot needs Manage Server, or Manage Channels in the invite's channel. The invite's join counts stay, so /invites code and Get Invite Details still show how it did.
Pair it with Run a Loop over every invite to clean up, like deleting invites nobody used.
Variables
| Variable | What it gives |
|---|---|
{deleted_invite_uses} |
How many times it had been used |
When it fails
It goes down its error path, with the reason in {error_reason}, when:
- It isn't an invite code, or the invite doesn't exist or has expired.
- The invite is for another server ("That invite is for another server, so the bot can't delete it from here").
- The bot is missing the permission ("The bot needs Manage Server, or Manage Channels in the invite's channel, to delete it").
- It isn't run in a server.
Enable Success/Error Handles
Enable Success / Error Handles to detect success and errors inside of the action block. The green path on the bottom left side of the block runs when it works, and the red path on the bottom right side runs when it fails. The error variables are listed here.