Reputation:
I have made a discord bot using discord.js I have a few commands and 3 other commands with embed form. One command is help works fine, the other two does not work, all the code is having the same main code, the code I use to send the message is message.channel.send(atc)
this is the code for the one that works fine.
if (command === "help") {
const help = new Discord.MessageEmbed()
.setColor(0xeb2315)
.setTitle("Coming to help")
.setDescription("The help command")
.setAuthor(message.author.username)
.addField("The prefix of this bot is ;", "You probably know this", true)
.setDescription("")
.addField("To add your custom channel contact me at Your daily dose of computers#6644", "Do it now", true)
.setDescription("")
.addField("Fealing lonely type ;hello", true)
.setDescription("")
.addField("To see the atc that are in this server type ;ATC", "not for this server", true)
.setDescription("")
.setThumbnail(message.author.avatarURL)
.addField("Ban", "Ban someone from the server", true)
.addField("Kick", "Kick someone from the server", true)
.addField("Ping", "Want to see your ping in this sever for some reason type ;Ping", true)
.setImage("https://cdn.discordapp.com/app-icons/805831227977236559/5743e8b25ebec0763346d08f4bf2a060.png?size=512"")
.setFooter("Coded designed and invited by Your daily dose of computers#6644");
message.channel.send(help);
}
And the one which doesn't:
if (command === "ATC") {
const atc = new Discord.MessageEmbed()
.setColor(0xf21313)
.setTitle("The atc in this server")
.setDescription("The atc in this server command")
.setThumbnail(message.author.avatarURL)
.setAuthor(message.author.username)
.addField("The atc are @121.8 KSFO GROUND @CapitinVector")
.setThumbnail("https://www.zazzle.com/rlv/svc/view?rlvnet=1&realview=113297416891423264&design=1768ff2c-4d36-43e0-8ebc-93e958b519e0&size=1.5&style=square_sticker&max_dim=220&ah=0&cacheDefeat=1612246725290")
.setImage(message.author.avatarURL)
.setFooter("made by Your daily dose of computers#6644");
message.channel.send(atc);
}
Upvotes: 0
Views: 74
Reputation: 196
Try to set 'atc' with no capital letters and as mentioned by m_hm0ud delete one of thumbnails and i think you need to fix your message.author.avatarURL
to message.author.displayAvatarURL
Upvotes: 0
Reputation: 95
This should be because you set the thumbnail twice, try removing one of the thumbnails and see if it works.
Correct me if I'm wrong.
Edit: If you got any errors, provide them.
Upvotes: 1