#Limiting total values across multiple arrays and distributing

5 messages · Page 1 of 1 (latest)

torn pawnBOT
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
plush saffron

Limiting total values across multiple arrays and distributing

calm steeple

I'm not sure what you're meaning by this, but I think you're looking for something like this:

const totalWhitelists = whitelists.users.length + whitelists.roles.length + whitelists.channels.length
``` adding the lengths of all 3 arrays together, we can get how much whitelists they have in total. You can check this amount in the code

You can check if the total amount of whitelists they're trying to add is greater than 5 or 20 in premium servers if you want that

oh so you want the length of the arrays of each whitelist type to be equal