discord embed doesn’t run properly Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of discord embed doesn’t run properly without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I am trying to send an embed with my discord but, it just gives me an error.

My code:

 const embed = new Discord.RichEmbed()
.setTitle("Info")
.setURL("https://www.fajaryusuf.com/wp-content/uploads/2020/12/fajaryusuf.com-zhongli-Genshin-Impact.jpga")
.setAuthor("Programmer: Acezx#7591", "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRQzjDisyw2UagcPjVWj0jOxhXWKd5ssesskQ&usqp=CAU","https://www.fajaryusuf.com/wp-content/uploads/2020/12/fajaryusuf.com-zhongli-Genshin-Impact.jpg")
.setColor('#e10e0e')
.setDescription("Info about The_ModBot")
.setFooter("Info, https://www.fajaryusuf.com/wp-content/uploads/2020/12/fajaryusuf.com-zhongli-Genshin-Impact.jpg")
.setImage("https://cdn.kincir.com/2/D47_jABuH801rq6yQPCK7Cm-m7yDH_w3jN-jZst--SQ/transform/rs:fill:764:400/src/production/2021-04/16by9/zhongli-1-5~69a0c2e9-4e03-4376-9a7c-c471dc3f240c.jpg")
.setThumbnail("https://www.siliconera.com/wp-content/uploads/2020/12/genshin-impact-zhongli.jpg")
.setTimestamp()
 
 client.on("message", message => {
   if (message.content === ";info") {
     message.channel.send({embed})
   }
 })

The error I recieve:

Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15) 
at Function.Module._load (internal/modules/cjs/loader.js:526:27) 
at Module.require (internal/modules/cjs/loader.js:666:19) 
at require (internal/modules/cjs/helpers.js:16:16) 
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15) 
at Function.Module._load (internal/modules/cjs/loader.js:526:27) 
at Module.require (internal/modules/cjs/loader.js:666:19) 
at require (internal/modules/cjs/helpers.js:16:16) 
at Object.<anonymous> (/app/server.js:1:15

Answer

There is a simple answer to this: your footer is not set correctly. You have to have a comma separating your text and your image. You just forgot to place 2 ". Try this:

.setFooter(
  "Info", 
  "https://www.fajaryusuf.com/wp-content/uploads/2020/12/fajaryusuf.com-zhongli-Genshin-Impact.jpg"
)
We are here to answer your question about discord embed doesn’t run properly - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji