#Limiting total values across multiple arrays and distributing
5 messages · Page 1 of 1 (latest)
Limiting total values across multiple arrays and distributing
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