title: Discord.js const guild = member.guild;
body: <p>Hello Programmers I Have Problem With Discord.js I Made Bot Which Is Says Hello @user But It Doesn't Work </p>
  
  <p>Here Is My Code:</p>
  
  <blockquote>
    <p>Javascript</p>
  </blockquote>
  
  <pre><code>const Discord = require("discord.js");
  const TOKEN = "private";
  const PREFIX = "!";
  const newUser = new Discord.Collection();
  const talkedRecently = new Set();
  var bot = new Discord.Client();
  var fortunes = 
  [
  "Yes",
  "No",
  "Maybe",
  "IDK"
  ];
  bot.on("ready", () =&gt; {
  });
  
          client.on("guildMemberAdd", (member) =&gt; {
              const guild = member.guild;
              newUsers.set(member.id, member.user);
  
              if (newUsers.size &gt; 0) {
                const defaultChannel = guild.channels.find(c=&gt; c.permissionsFor(guild.me).has("SEND_MESSAGES"));
                const userlist = newUsers.map(u =&gt; u.toString()).join(" ");
                defaultChannel.send("Hello Creativistian!\n" + userlist);
                newUsers.clear();
              }
            });
      });
  
  bot.login(TOKEN);
  </code></pre>
  
  <p>Does Anyone Know How To Fix It</p>