89
rated 0 times
[
96]
[
7]
/ answers: 1 / hits: 11302
/ 3 Years ago, fri, august 13, 2021, 12:00:00
How to attach more than 5 buttons to a message with discord-buttons, discord.js?
The way I try:
let Buttons = [];
Buttons[0] = new discordButton.MessageButton().setStyle('gray').setID("0").setLabel(' ');
Buttons[1] = new discordButton.MessageButton().setStyle('gray').setID("1").setLabel(' ');
Buttons[2] = new discordButton.MessageButton().setStyle('gray').setID("2").setLabel(' ');
Buttons[3] = new discordButton.MessageButton().setStyle('gray').setID("3").setLabel(' ');
Buttons[4] = new discordButton.MessageButton().setStyle('gray').setID("4").setLabel(' ');
Buttons[5] = new discordButton.MessageButton().setStyle('gray').setID("5").setLabel(' ');
Buttons[6] = new discordButton.MessageButton().setStyle('gray').setID("6").setLabel(' ');
Buttons[7] = new discordButton.MessageButton().setStyle('gray').setID("7").setLabel(' ');
Buttons[8] = new discordButton.MessageButton().setStyle('gray').setID("8").setLabel(' ');
msg.channel.send(`...`, { buttons:Buttons });
The error it gets:
DiscordAPIError: Invalid Form Body
components[0].components[5]: The specified component exceeds the maximum width
components[0].components[6]: The specified component exceeds the maximum width
components[0].components[7]: The specified component exceeds the maximum width
components[0].components[8]: The specified component exceeds the maximum width
method: 'post',
path: '/channels/656858400440975371/messages',
code: 50035,
httpStatus: 400
}
Does it have something to do with my bot account?
More From » button