#seperate 15 buttons into 3 different arrays

8 messages · Page 1 of 1 (latest)

vague latch
#

i am trying to make it so, someone gives an array of say 15 buttons. how do i seperate those 15 buttons into 3 different rows of 5

sour tangleBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

vague latch
#

also want it to be dynamic, if 20 buttons is given it seperates into four

knotty flower
#

An actionRow can only contain up to 3 buttons iirc, and there is lilit of 5 ActionRows on a message

vague latch
#

its 5 buttons per row

#

and i know about the limits

knotty flower
#

ah oops, i thought it was 3, my bad

dire umbra
#

Depends, do you want to just fill the rows until they’re full? Or try to make it another distribution if it’s not easily divisible by 5?