Answers for "how to reference the bot joining a server in discord.js"

1

send a message when a bot joins your server discord.js

client.on('guildCreate', guild => {
  guild.systemChannel.send(`Hello, I'm LMAOBOT. Thanks for inviting me, here are a list of all my commands! :alien:`)
});
Posted by: Guest on October-09-2020
0

how to reference the bot joining a server in discord.js

client.on('guildCreate', guild => {
    const channel = guild.channels.cache.find(channel => channel.type === 'text' && channel.permissionsFor(guild.me).has('SEND_MESSAGES'))
    channel.send("Thanks for inviting me")
})
Posted by: Guest on January-04-2021

Code answers related to "how to reference the bot joining a server in discord.js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language