how to emit the bot joining a server in discord.js code example
Example 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:`)
});
Example 2: how to send a message using discord.js
message.channel.send("a")