Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/onesoft-sudo/sudobot/llms.txt

Use this file to discover all available pages before exploring further.

When a member joins your server, SudoBot fires its welcomer system and posts a message to the channel you designate. You can supply a fully custom message with inline placeholders, let the bot pick from a built-in pool of randomized greetings, wrap the output in an embed, and attach an interactive “Say Hi” button so existing members can acknowledge the newcomer.

How it works

SudoBot listens for the guildMemberAdd gateway event. When it fires for a non-bot user, the bot reads your welcomer configuration block, resolves the target channel, processes any placeholders in the message text, and sends the result. If you enable say_hi_button, the sent message also receives an interactive button whose state is managed through the interactionCreate event.

Configuration

All welcomer settings live under the welcomer key of your guild config. The only required field is channel.
{
  "welcomer": {
    "enabled": true,
    "channel": "123456789012345678",
    "custom_message": "Welcome :mention: to :guild:! Glad you're here.",
    "force_embeds": true,
    "forced_embed_color": 32767,
    "randomize": false,
    "delete_after": 300000,
    "say_hi_button": {
      "enabled": true,
      "label": "Say Hi!",
      "emoji": "👋",
      "reply": ":acc: said hi to you!",
      "expire_after": 300000
    }
  }
}

Configuration reference

FieldTypeDefaultDescription
enabledbooleanfalseTurns the welcomer on or off.
channelsnowflakeRequired. The channel where welcome messages are posted.
custom_messagestringYour custom welcome text. Supports placeholders (see below).
randomizebooleanfalseWhen true, ignores custom_message and picks from the built-in pool instead.
force_embedsbooleantrueWraps the message in a Discord embed instead of sending plain text.
forced_embed_colorintegerDecimal color value for the forced embed.
delete_afterintegerMilliseconds after which the welcome message is deleted.
say_hi_button.enabledbooleanfalseAttaches a “Say Hi” button to the welcome message.
say_hi_button.labelstring"Say Hi"Button label text.
say_hi_button.emojistring"👋"Emoji shown on the button.
say_hi_button.replystring":acc: said hi to you!"Reply text. Must include :acc: as the accumulator placeholder.
say_hi_button.expire_afterinteger300000Milliseconds before the “Say Hi” response is deleted (5 000–600 000).

Placeholders

Use these tokens anywhere in your custom_message. SudoBot replaces them at send time, before passing the text through the directive parser.
PlaceholderReplaced with
:mention:A Discord mention of the joining member (<@ID>).
:username:The member’s plain username (no discriminator).
:guild:The name of the server.
Welcome :mention: to :guild:! Your username is :username:.
Placeholder matching is case-insensitive. :MENTION:, :Mention:, and :mention: are all equivalent.

Setting up the welcomer

1

Choose a welcome channel

Create or pick an existing text channel for welcome messages. Copy its ID (right-click the channel → Copy Channel ID with Developer Mode enabled).
2

Add the configuration block

Open your guild config file and add the welcomer object. At minimum, set enabled: true and provide the channel ID.
{
  "welcomer": {
    "enabled": true,
    "channel": "YOUR_CHANNEL_ID"
  }
}
3

Write a custom message (optional)

Add a custom_message with placeholders. If you want a random built-in greeting instead, set randomize: true and omit custom_message.
{
  "welcomer": {
    "enabled": true,
    "channel": "YOUR_CHANNEL_ID",
    "custom_message": "Hey :mention:, welcome to :guild:!"
  }
}
4

Enable the Say Hi button (optional)

Add the say_hi_button object and set enabled: true. The :acc: placeholder in the reply string is replaced with a comma-separated list of users who have clicked the button.
{
  "say_hi_button": {
    "enabled": true,
    "label": "Say Hi!",
    "emoji": "👋",
    "reply": ":acc: said hi to you!"
  }
}
5

Reload the bot configuration

Restart SudoBot or use the appropriate config-reload mechanism so the new settings take effect.

Message modes

When custom_message is set and randomize is false, SudoBot processes your string through the placeholder substitution step and then the directive parser, which resolves embed directives. This lets you include rich embeds inline with your welcome text.
Welcome :mention: to :guild:!

$embed title="Hello!" color=0x007bff
We're happy to have you here.
$endembed

Say Hi button behavior

When say_hi_button.enabled is true, SudoBot appends a button component to every welcome message. Clicking it posts a reply tagging the user who clicked. If the same person clicks again, the bot edits the existing reply to append their name—so the button accumulates a list of everyone who has greeted the new member.
The reply string must contain the :acc: placeholder. If it is missing, SudoBot falls back to its built-in reply format and logs a warning.

Build docs developers (and LLMs) love