text: /*
    A bot that welcomes new guild members when they join
  */
  
  // Import the discord.js module
  const Discord = require('discord.js');
  
  // Create an instance of a Discord client
  const client = new Discord.Client();
  
  // The token of your bot - https://discordapp.com/developers/applications/me
  const token = 'NDEwNzY3NjU3MzE1MzM2MTkz.DVx8wQ.jGufepUAkbKtC55MfiIdI-GRvUU';
  
  // The ready event is vital, it means that your bot will only start reacting to information
  // from Discord _after_ ready is emitted
  client.on('ready', () => {
    console.log('I am ready!');
  });
  
  // Create an event listener for new guild members
  client.on('guildMemberAdd', member => {
    // Send the message to a designated channel on a server:
    const channel = member.guild.channels.find('name', 'member-log');
    // Do nothing if the channel wasn't found on this server
    if (!channel) return;
    // Send the message, mentioning the member
    channel.send(`Welcome to the server, ${member}`);
  });
  
  // Log our bot in
  client.login(token);
  