Discord welcome bot with an automatic role
It greets new members with a message you write, hands them a role and says goodbye when they leave.
- Plan
- Free, always on
- Setup
- A token, then /welcome
- Privileged intents
- Server Members
- Permissions
- Manage Roles, Send Messages
What the welcome bot does
Your own welcome
Written with /welcome message: {user} mentions the member, and {username}, {server} and {count} fill themselves in. It arrives with their avatar.
A role on the way in
/welcome role gives every new member a role, so they see the right channels from their first minute.
In their DMs as well
/welcome dm on sends the same welcome as a direct message.
A goodbye
/goodbye channel and /goodbye message post a line when someone leaves.
Set it up
- 1
Create the bot
At discord.com/developers, New Application, then Bot and Reset Token. Copy the token.
- 2
Turn on Server Members
Under Bot, Privileged Gateway Intents. Joins and leaves never reach a bot without it.
- 3
Invite it
With the
botandapplications.commandsscopes and Manage Roles and Send Messages. Drag its role above the role it hands out. - 4
Deploy it
Press Deploy free, pick the Welcome Bot template and paste the token. The welcome message can wait.
- 5
Set it up
/welcome channel #welcome,/welcome messagewith your text,/welcome role @Member, then/welcome testto see it.
Commands
Welcome
- /welcome channel #channel
- Where welcome messages go.
- /welcome message text
- The welcome, up to 1,500 characters, with {user}, {username}, {server} and {count}.
- /welcome role [@role]
- The role every new member gets. Leave it out to stop.
- /welcome dm on/off
- Also send the welcome as a direct message.
- /welcome test
- Shows you the welcome as it would appear.
- /welcome status
- What is set up.
Goodbye
- /goodbye channel [#channel]
- Where goodbye messages go. Leave it out to stop them.
- /goodbye message text
- The goodbye. Unless you change it, it says {username} left the server.
Environment variables
They live in the table on the bot's page in the panel, values masked once saved. The template's form asks for the ones it needs when you deploy.
| Variable | Needed | What it is |
|---|---|---|
| DISCORD_TOKEN | Required | Your bot token. |
| WELCOME_CHANNEL_ID | Optional | The welcome channel, if you would rather not use /welcome channel. |
| WELCOME_MESSAGE | Optional | The welcome text. |
| AUTO_ROLE_ID | Optional | The role new members get. |
| GOODBYE_CHANNEL_ID | Optional | The goodbye channel. |
| GOODBYE_MESSAGE | Optional | The goodbye text. |
Which plan it needs
The free plan runs it, always on. A welcome is one message per join, however big the server gets.
Free
Recommended$0
No card
- 256 MB and a quarter of a CPU, always on
- No card: one free bot or app per person
- No renewals. Only a bot with no network traffic for 7 days is stopped
Starter
$2/mo
or $20 a year
- 1 GB of memory and a full vCPU
- Never stopped for being quiet
- You pick the region it runs in
Running more than one? Standard carries two bots or apps for $3 a month and Pro four for $6, on one bill with your game servers. Every plan
Frequently asked questions
Nobody gets welcomed. What is wrong?
Usually one of two things. The Server Members intent is off, so joins never reach the bot: turn it on under Bot, Privileged Gateway Intents and restart the bot. Or no channel is set: there is none until you pick one with /welcome channel.
Which placeholders can I use?
{user} mentions the member, {username} is their account name, {server} your server's name and {count} the member count, bots included. They work in the goodbye too.
Why does the new member not get the role?
Discord only lets a bot give roles below its own. Drag the bot's role above the one it hands out, and check that it has Manage Roles.
Is the welcome bot free?
Yes. It runs on the free plan, always on, with no card. One bot or app is free per person; a second one needs a paid plan, from $2 a month for one or $3 for two.
More ready-made bots
Bringing your own code instead? How a bot deploys from GitHub
Welcome people to your server
Your first bot is free, with no card. It logs in within a minute.