Not 100% sure if I'm doing this right but it looks like the second component (line 13)
does not get recognized or something
am I doing this wrong or did I miss something? I tried following the documentation here but couldn't figure it out,
I just think my brain is just broken haha
I would appreciate the help
This is for the buttons using Discord.js 12.5.3
client.api.channels(applicationChannelId).messages.post({
data: {
embeds: [application],
components: [{
type: 1,
//accept button
components: [{
type: 2,
style: 3,
label: "Accept",
custom_id: "accept",
//deny button
components: [{
type: 2,
style: 4,
label: "Deny",
custom_id: "deny"
}]
}]
}]
}
data.components accepts an array of MessageComponents so instead of trying to add multiple values of components you can just add it to an array like so:
client.api.channels(applicationChannelId).messages.post({
data: {
embeds: [application],
components: [{
type: 2,
style: 3,
label: "Accept",
custom_id: "accept"},
{
type: 2,
style: 4,
label: "Deny",
custom_id: "deny"
},
]})