Currently, I have a command in my bot where it will react to anything with discord.gg
in the message. I want the bot to be able to post the embed message each time a discord invite is posted, but delete the last embed message it sent so it would look like the bot is keeping one specific message at the end of a channel.
This is what the code looks like right now, thank you for your help!
let keyword15 = ["discord.gg"];
if (msg.author.bot) return;
if((msg.content.toLowerCase().includes(keyword15) )
){
const embed2 = new Discord.MessageEmbed()
.setDescription('Promotion Operator \n ▫️ **Do not post outside the advertisement channel.** \n ▫️ **Do not advertise your server via DM.**')
.setColor(0x000000)
msg.channel.send(embed2);
}