Invite tracking and leave messages
See who invited each new member, post join and leave messages, reward top recruiters with level-up roles and track keyword invites with /invite.
On this page
- Before you start
- Set it up
- Settings explained
- Channels
- Invite Levelup Roles
- How the inviter is found
- Commands
- Examples
- Invite Welcome Channel
- Invite Announcements Channel
- Invite Leave Channel
- Invite Welcome Log
- Invite Leave Log
- /invite create
- Troubleshooting
- Nobody is shown as the inviter
- Nothing is posted in an invite channel
- Level-up roles aren't given
- A member left but no leave message was posted
- "Guild Member Remove Log" shows up in Bot Error Logs
- The keyword doesn't show
- Related
Invite tracking tells you how each new member found your community. When someone joins, the bot works out which invite link they used and who made it, then posts a welcome with that information. You can also post a message when members leave, keep private join and leave logs for staff, and reward members who bring in new farmers with Invite Levelup Roles.
Before you start#
- The bot only tracks invites that members create. Joins through your vanity URL, the server widget or similar can't be linked to a person.
- Keep the two admin log channels private. They're meant for staff only.
- If a channel or role is missing from a list, run
/setupin Discord, choose Update Channels and Roles for Website, then reload the page.
Set it up#
It's under Moderation in the sidebar.
In Discord Bot Invites Manager Settings, choose an Invite Welcome Channel, Invite Leave Channel and Invite Announcements Channel. Leave any you don't want on Disabled - Select Channel to Enable.
In Invite Admin Logs, choose an Invite Welcome Log and Invite Leave Log channel.
Click Update Bot Settings. Both buttons on the page save all five channels.
In Invite Levelup Roles, pick a role, type how many invites it needs in Invite Count #, and click Add. Repeat for each level.
Settings explained#
Channels#
| Setting | What the bot posts there | Default |
|---|---|---|
| Invite Welcome Channel | An embed for each new member: who invited them, your member count, the inviter's total invites and the invite's keyword. | Disabled |
| Invite Leave Channel | A short line when a member leaves, with who invited them. | Disabled |
| Invite Announcements Channel | A congratulations message when an inviter reaches a new Invite Levelup Roles level. | Disabled |
| Invite Welcome Log | Staff log: a "joined the server" line and a Member Joined embed with the inviter and account age. Bots get a Bot Joined embed. | Disabled |
| Invite Leave Log | Staff log: a Member Left (or Bot Left) embed with when they joined and the roles they had. | Disabled |
Invite Levelup Roles#
Each level is a role plus an Invite Count #. The table below the form lists Role Name and Invite Count. Click the trash button to delete a level.
When an inviter's total reaches a level, the bot announces it in the Invite Announcements Channel, gives them that level's role, and takes away the role from their previous level. They always hold the highest level they qualify for.
The bot only hands out Invite Levelup Roles when an Invite Announcements Channel is set. Without one, nobody gets a level-up role.
How the inviter is found#
Discord doesn't tell bots which invite someone used, so the bot works it out:
- The bot keeps its own copy of every invite link in your server and how many times each was used. It saves new invites as they're created (when at least one invite channel is set), refreshes the whole list after every join, and once a day.
- When someone joins, it fetches your invites again and compares the use counts.
- The invite whose count went up is the one they used. Its creator is the inviter.
If no invite's count went up (a vanity URL, the server widget, or an invite the bot hadn't seen yet), the join is still recorded, just without an inviter.
An inviter's total is the number of different members they've invited. Members who later leave still count toward that total.
Commands#
/invite create <keyword> Admins & command rolesCreate a new invite
/invite stats Admins & command rolesShow invite stats
/invite create keyword:makes a permanent invite (never expires, no use limit) for the channel you run it in, tagged with your keyword. Spaces in the keyword become dashes, and it's cut to 50 characters. The bot posts the invite in the channel./invite statsshows you (only you) the top 20 invites by uses, with each invite's code, keyword, creator and uses.
These commands need Administrator, or a role you've allowed for them in Command roles.
Discord reuses an existing invite for a channel, so each channel has one invite code. Run
/invite create in different channels for different keywords, for example one for a YouTube
video and one for a partner server. Set up your invite channels before you create them.
Examples#
Invite Welcome Channel#
When the inviter is known:
When the inviter can't be found, the embed just says alex_92 welcome to the server! and shows the member count. The new member's avatar shows on the right.
Invite Announcements Channel#
Nice work @sam_farms you have reached @Recruiter rank!
The bot reacts to it with 🎉.
Invite Leave Channel#
alex_92 left the server. Invited by sam_farms
Invite Welcome Log#
alex_92 joined the server.
When the inviter isn't known, the log says "Invited by Widget or Vanity URL".
Invite Leave Log#
/invite create#
The bot then posts the invite link on its own line so it's easy to copy.
Overall Server Invites on your dashboard's main page lists joins and leaves for each inviter and keyword. See Dashboard stats.
Troubleshooting#
Problems are written to Bot Error Logs on your dashboard's main page.
Nobody is shown as the inviter#
- Give the bot Manage Server. Without it, the bot can't read your invites.
- The member used your vanity URL, the server widget or an invite the bot couldn't see. These can't be credited.
- An invite made while the bot was offline may not be credited for the first join through it. The bot catches up right after that join.
Nothing is posted in an invite channel#
Bot Error Logs shows Invite Channel, Invite Channel Log, Leave Channel, Leave Channel Log or Invite Announcments Channel with "Unable to send messages in server channel." Give the bot View Channel and Send Messages there.
Level-up roles aren't given#
- Set an Invite Announcements Channel. Roles are only handed out with it.
- Give the bot Manage Roles and move its role above the level-up roles in Server Settings > Roles. Bot Error Logs shows "Unable to manage roles in server." when it's missing.
- Check the Invite Count # values in the table.
A member left but no leave message was posted#
The Invite Leave Channel line is only posted for members whose join the bot recorded. Members who joined before the bot was in your server don't get one. The Invite Leave Log posts for everyone.
"Guild Member Remove Log" shows up in Bot Error Logs#
The bot logs this when members leave and it's missing Manage Messages or Manage Roles in your server. Leave messages and logs are still posted. Give the bot both permissions to stop it.
The keyword doesn't show#
Keywords only show for invites made with /invite create. Set at least one invite channel first,
then create the invite again.