title: How to fix Discord API: Unknown Message error?
body: <p>I'm trying to make a meme command but whenever I try to use it I get this error "DiscordAPIError: Unknown Message".</p>
  
  <p>This was working earlier but when I came back to my PC it started glitching out.</p>
  
  <p>Here's my code</p>
  
  <pre><code>const { RichEmbed } = require("discord.js");
  const randomPuppy = require("random-puppy");
  const usedCommandRecently = new Set();
  
  module.exports = {
      name: "meme",
      aliases: ["memes", "reddit"],
      category: "fun",
      description: "Sends a random meme",
      run: async (client, message, args) =&gt; {
          if (message.deletable) message.delete();
          var Channel = message.channel.name
          //Check it's in the right channel
          if(Channel != "memes") {
              const channelembed = new RichEmbed()
                  .setColor("BLUE")
                  .setTitle(`Use me in #memes`)
                  .setDescription(`Sorry ${message.author.username} this command is only usable in #memes !`)
              return message.channel.send(channelembed);
          }
          //Check cooldown
          if(usedCommandRecently.has(message.author.id)){
              const cooldownembed = new RichEmbed()
                  .setColor("GREEN")
                  .setTitle("Slow it down, pal")
                  .setDescription(`Sorry ${message.author.username} this command has a 30 second cooldown per member, sorry for any inconvenice this may cause`)
              message.channel.send(cooldownembed)
          } else{
              //Post meme
              const subReddits = ["dankmeme", "meme", "me_irl"];
              const random = subReddits[Math.floor(Math.random() * subReddits.length)];
  
              const img = await randomPuppy(random);
              const embed = new RichEmbed()
                  .setColor("RANDOM")
                  .setImage(img)
                  .setTitle(`From /r/${random}`)
                  .setURL(`https://reddit.com/r/${random}`);
  
              message.channel.send(embed);
          }
      }
  }
  </code></pre>