So basically I'm trying to create a Discord bot that when you type "!cat" the Discord bot sends an image of a random cat inside of an embed but every time I use the command the image stays the same.... I tried to put the embed variable inside of the function so it refreshes every time someone says "!cat" but it didn't work..... this is the code that I'm using:
const Discord = require('discord.js');
const client = new Discord.Client();
client.once('ready', () => {
console.log('Ready!');
});
client.on('message', message => {
console.log(message.content);
if (message.content === "!cat") {
const catEmbed = new Discord.MessageEmbed()
.setTitle("MEOW!")
.setImage("http://theoldreader.com/kittens/600/400")
.setThumbnail("http://theoldreader.com/kittens/600/400")
message.channel.send(catEmbed)
}
});
client.login('NOT GONNA TELL MY TOKEN');