I made a discord bot for someone and they want me to make embedded messages, I really don’t know how to do that, can someone help me? Because I’ve tried some and I have no idea on how to it since I’m new to coding.
let discord = require("discord.js)
let embed = new discord.RichEmbed()
.setAuthor("Author")
.setTitle("Title")
.setColor("Color")
.setTimestamp()
.setURL("https:/\/url.to/go/to")
.addBlankField()
.setImage("https://url.to/image.png")
.setThumbnail("https://url.to/thumbnail.png")
.setDescription("Description")
.addField("Field one", "field data")
.addField("Field 2", "field data")
.setFooter("Footer");
message.channel.send(embed) // or message.channel.send("A message
above embed", {embeds: embed})
Not all those need to be added to the embed, you can use any of
them you want, there are limitations obviously!
You can find the official documentation here!
So do I just paste that into the Visual Studio Code? And that’s it? Do I like need to run a command or something? I don’t really understand the documentation either.
Well, of course the example I gave just shows an example of all the functions, for RichEmbeds, you will have to customize it yourself! What will the RichEmbed contain? And do you have a command handler?
No I don’t have a command handler , I don’t know what that means… I’m extremely confused…
I know that I have to change the Author names and stuff please help me I don’t know what to do
What will the embed be for, what do you want it to contain?
I want it to contain the Author’s name (mine) bot version, discord server for support, my discord basically the basic information about the bot and sometimes idk for like announcements @Callum
So can you help me with it? I just want it for the help section of the bot please, @Callum
Maybe this will be of use to you!
let version = "1.0.0"
let developer = "YourUsername#0918"
let embed = new discord.RichEmbed()
.setAuthor("Bot Info")
.addField("Username:" client.user,username)
.addField("Version:", version)
.addField("Latest Updates:", `
\`\`\`
Version 1.0.1
- Bug fixes
Version 1.0.0
- New commands
\`\`\`
`)
.setFooter("Bot developed by: "+developer)
.setColor("RANDOM")
message.channel.send(embed);
@nothinghereWER, I’ve already replied in the thread I need help to make a announcements command!
Hey man! I want to use this but I have a command handler and I don’t want to copy it for every command.
Hey @ConnorJenks, please refrain from bumping posts that are 8 months old - create a new topic instead.
alguien me pasaria el codigo de los embed ?
This Might’ve Worked Before A While But I Currently Am new To Coding But I See This Is Not Working For Me So I Would Like To Ask If There Is a way for me to do it in 2021
change RichEmbed
to MessageEmbed