A Discord welcome bot, built from blocks
A welcome bot reacts when someone joins your server: it posts a message in a channel, can give a starter role and can send a private message. In Bot Creator you build it on the member-join event, without writing code.
How to build it
- On Discord, enable the Server Members Intent for your bot in the Developer Portal. Discord only sends member joins to bots that have it (the token guide shows where).
- In Bot Creator, create a command and choose the Event trigger, then the event Guild Member Add.
- Add a Send Message block with the target set to a channel and your channel ID. Write the text with placeholders, for example
Welcome ((member.mention)) to ((guild.name))! You are member number ((guild.memberCount)). - Optional: add an Add Role block with the user set to
((member.id))and the ID of your starter role. - Optional: add a Send Direct Message block to
((member.id)). - Check the look of the message in the playground, then run the bot.
Blocks you will use
Block names are the ones of the app; each links to its entry in the dictionary.
- Send Message — Posts the welcome message in a channel (or replies, or sends a DM). Supports embeds and buttons.
- Add Role — Gives a role to the member who joined.
- Send Direct Message — Sends a private message to a user.
What to know
- The bot only sees joins while it is running.
- A private message fails if the member has closed their direct messages (Discord rule).
- The playground draws the message of a Send Message block; it does not simulate the join event.