I just wanted to make a embed with 2 buttons but it doesn't seem what i want
if (message.author.bot) return;
if (message.content.toLowerCase().startsWith("?bhelp")) {
let embed = new Discord.MessageEmbed()
.setTitle(`Hello ${message.author.username}!`)
.setDescription("Prefix for this server is `?b`")
.setColor("ORANGE")
.addField("๐ ๏ธ | Utlity", "`help` `whoareyou` `ping` `offserver` `updates` `timer` `ticket`")
.addField("๐ก๏ธ | Moderation", "`bgevents` `clear` `mute` `warn` `unmute` `serverinfo` `info` `ban` `userinfo` `slowmode` `poll` `eval` `membercount` `create-channel` `delete-channel` `lock` `unlock` `unban` `giverole` `removerole`")
.addField("๐ธ | Image Genration", "`cmm` `slap` `meme`")
.addField(":smile: Fun", "`avatar` `kill` `thanks` `nitro` `hug` `chatbot` `8ball` `noobrate` `dice` `nuke` `jumble` `weather` `rps` `search`")
.setTimestamp()
.setFooter(`GREETINGS ${message.author.username}:D`)
let but = new disbut.MessageButton()
.setStyle('url')
.setLabel('Invite me!')
.setURL('https://dsc.gg/blab')
let but1 = new disbut.MessageButton()
.setStyle('url')
.setLabel('Vote me on Top.gg!')
.setURL('https://top.gg/bot/885379319122264075')
message.channel.send(embed).then(m =>{m.channel.send(but,but1)})
}
heres the code but here what output i see
can anybody help me?
You shouldn't be sending any text or embeds like this
message.channel.send(embed).then(m =>{m.channel.send(but,but1)})
You should remember to only send one string of text or one embed/button at a time. The fixed version would look like this
message.channel.send(embed).then(m => {
m.channel.send(but)
m.channel.send(but1)
})