Skip to content

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

  1. 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).
  2. In Bot Creator, create a command and choose the Event trigger, then the event Guild Member Add.
  3. 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)).
  4. Optional: add an Add Role block with the user set to ((member.id)) and the ID of your starter role.
  5. Optional: add a Send Direct Message block to ((member.id)).
  6. 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.

Go further

Other things you can build