This is my command:
//comando button test
if(prefix&&comando === 'button'){
const embMessage = new discord.MessageEmbed()
.setTitle('Teste de botões')
.setDescription('Esse é um teste de botões')
const yes = new MessageButton()
.setStyle('green')
.setLabel('Sim')
.setID('smart')
const no = new MessageButton()
.setStyle('red')
.setLabel('Não')
.setID('dumbass')
message.channel.send({embeds:[embMessage], buttons:[yes, no]})
}
But I'm having this issue:
class sendAPICallback extends dAPIMessage {
^
TypeError: Class extends value undefined is not a constructor or null
In that case, I can't run the bot code. :(
"discord-buttons": "^4.0.0"
To make them be sent "buttons" should be changed into "components"
message.channel.send({embeds:[embMessage], components:[yes, no]});
And as far as i know it should be an action row
message.channel.send({embeds:[embMessage], components:[new discord.MessageActionRow().components([yes, no])]});
And there you have it
Update: Just realized your using buttons package so idk if it will change a thing or not