Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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")
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reference #bot #joining #server
ADD COMMENT
Topic
Name
7+1 =