Search code examples
javascriptvisual-studio-codediscorddiscord.js

My Discord bot won't reply back with the Embed I made


I don't know much about coding myself but I followed someone's video (specifically this video:https://www.youtube.com/watch?v=tQjpv0OO5pA) on how to make embeds on discord using your own bot and I did what he showed on the video... It was outdated but there were people in the comment section helping each other out... But it didn't help me that much because I had the same problem all over again which is the embeds not showing up when I enter my prefix (which is !embed) even though I don't get any errors in visual studio code.

enter image description here


Solution

  • Why dont you try replacing the switch statements with the following :-

    //write instead of switch
    
    if (message.content === `${prefix}embed`) {
        let embed = new Discord.MessageEmbed()
           .setTitle("test")
           .setDescription("Test");
        message.channel.send(embed);
    }