Command executes when a user joins the guild.
Last updated 3 years ago
Was this helpful?
Event: onJoin Type: joinCommand
onJoin
joinCommand
Add the onJoin Event:
bot.addEvent([ "onMessage", "onInteraction", "onJoin" //This is what you need to add ])
Add the GUILD_MEMBERS Intent:
GUILD_MEMBERS
const dbd = require("dbd.ts") const bot = new dbd.Bot({ intents: ["GUILDS", "GUILD_MESSAGES", "GUILD_MEMBERS"], prefix: "PREFIX" }) //The rest of your index.js file here
Enable Prilivaged "Members Intent" in the :
bot.commands.add({ type: "joinCommand", code: `$channelSendMessage[773363417338609674;Welcome <@$authorID>!]` })
You should use server variables in $channelSendMessage[] (if your bot is in more than 1 server).
$channelSendMessage[]