guild create discord.js code example
Example 1: discord.js guildMemberAdd
client.on('guildMemberAdd', (guildMemberAdd) => {
//Your code
});
//Note, you have to define client.
//Its best to run these events through something called a "event handler"
Example 2: discord js channel send
const user = <client>.users.cache.get('<id>');
user.send('<content>');
Example 3: discord js channel send
const channel = <client>.channels.cache.get('<id>');
channel.send('<content>');