When a user joins the server, the command is triggered.
$onJoined[channelID] is a callback, which means it's used in the command trigger (not the code). The command is ran when a user joins the server. You must replace 'channelID' with a valid channel ID.
#1: Make the command trigger
#2: Input your code/reply text.
🧙♂️ You can use functions like
#3: Now you have a welcome message! ✨
Not Working? Check out the Troubleshooting section.
#1: You must have atleast version
1.17.9 of the app.
#2: Go to Discord Developer Portal, go to your bot's page, and enable Member Intents.
#3: Open app and go to bot settings, then enable Member Intents.
Note: Enabled intents in the app should reflect the intents enabled in the Discord Developer Portal.
For example: If you have
members intentenabled in the Discord Developer Portal then you should respectively enable them in the app (unless you don't want to use them at all).
#4: Make sure
$onJoined[channelID] is inputted in the 'command trigger' field, not the code.
#5: Make sure your bot has the
SEND_MESSAGES permission in the channel provided in
$onJoined, and that you inputted a valid channel ID.
Both free and premium users can use
$onJoined, and all users can put
$onJoined. However, non-premium users can not use
$getServerVar outside of callbacks.
If you own a public bot and want to make it so multiple different servers can use
$onJoined (e.g. set their own welcome channel), follow these steps:
#1: Make a variable named "
welcome" and the value set to nothing.
#2: Make a command for setting the welcome channel, then put the following in your code:
$nomention $onlyAdmin[You need the admin permission to use that!] $argsCheck[>1;Please mention a channel!] Welcome channel updated! $setServerVar[welcome;$mentionedChannels]
Note: Servers will need to setup the channel they want the welcome message to send to (by running a command with the code above).
#3: Now replace
$onJoined[channelID] in your welcome command trigger, with
$onJoined[$getServerVar[welcome]] and you're all set!