title: Why do mydropdown keep failling? Discord.js
body: <p>This what my console shows:
  UnhandledPromiseRejectionWarning: ReferenceError: client is not defined
  at Object.execute (/home/runner/Bot/commands/rr1.js:99:5)
  at processTicksAndRejections (internal/process/task_queues.js:97:5)
  (node:2432) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag <code>--unhandled-rejections=strict</code> (see <a href="https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode" rel="nofollow noreferrer">https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode</a>). (rejection id: 1)
  (node:2432) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.</p>
  <pre><code>const Discord = require(&quot;discord.js&quot;)
  const { MessageMenuOption, MessageMenu } = require(&quot;discord-buttons&quot;)
  const { prefix } = require('../config.json')
  
  module.exports = {
    name: 'rr1',
    description: 'send embedded level message',
    async execute(message, args) {
      const option1 = new MessageMenuOption()
        .setLabel(&quot;Black Charcoal&quot;)
        .setValue(&quot;Option 1&quot;)
        .setDefault()
        .setEmoji(&quot;&quot;)     
      const option2 = new MessageMenuOption()
        .setLabel(&quot;Love Magenta&quot;)
        .setValue(&quot;Option 2&quot;)
        .setDefault()
        .setEmoji(&quot;❤️&quot;)
      const selection = new MessageMenu()
        .setID(&quot;Selection&quot;)
        .setMaxValues(1)
        .setMinValues(0)
        .setPlaceholder(&quot;Select Role&quot;)
        .addOption(option1)
        .addOption(option2)
      const embed = new Discord.MessageEmbed()
        .setColor(&quot;0x00a6ff&quot;)
        .setTitle(&quot;Colour Role&quot;)
        .setDescription(`&lt;@&amp;x&gt;\n&lt;@&amp;x&gt;`)
      const role1 = message.guild.roles.cache.find(r =&gt; r.id === &quot;x&quot;)
      const role2 = message.guild.roles.cache.find(r =&gt; r.id === &quot;x&quot;)
  
      async function menuselection(menu) {
        switch(menu.values[0]) {
          case &quot;Option 1&quot;: 
            if(message.member.roles.cache.has(&quot;x&quot;) || message.member.roles.cache.has(&quot;x&quot;) || message.member.roles.cache.has(&quot;x&quot;)){
              await message.member.roles.add(role1)
              await message.member.roles.remove([role2])
              await menu.reply.send(&quot;Claimed Black Charcoal!&quot;, true)}
          break;
          case &quot;Option 2&quot;:
            if(message.member.roles.cache.has(&quot;x&quot;) || message.member.roles.cache.has(&quot;782356910782677003&quot;) || message.member.roles.cache.has(&quot;780476718820884581&quot;)){
              await message.member.roles.add(role2)
              await message.member.roles.remove([role1])
              await menu.reply.send(&quot;Claimed Love Magenta!&quot;, true)}
          break;
        }
      }
      let menumsg = await message.channel.send(embed, selection)
      client.on(&quot;clickMenu&quot;, (menu) =&gt; {
        if(menu.message.id == menumsg.id) {
          if(menu.clicker.user.id == message.author.id) menuselection(menu)
          else menu.reply.send(&quot;You are not allowed to pick!&quot;, true)
        }
      })
    }
  }
  </code></pre>
  <p>Main.js</p>
  <pre><code>client.on('message', async (message, guild) =&gt; {
    if (!message.content.startsWith(prefix) || message.author.bot) return;
    const args = message.content.slice(prefix.length).split(/ +/);
    const command = args.shift().toLowerCase();
  
      switch (message.content) {
        case (prefix + &quot;rr1&quot;):
          client.commands.get(&quot;rr1&quot;).execute(message, args);
        break;
      }
  });
  </code></pre>