How do I limit the number of roles that guild.roles.cache shows (It crashes bot)

28 Replies
d.js toolkit
d.js toolkit2y ago
• 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.
kane.b
kane.bOP2y ago
^14.11.0
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
kane.b
kane.bOP2y ago
after a certain amount of roles in the discord server it crashes
kane.b
kane.bOP2y ago
kane.b
kane.bOP2y ago
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
kane.b
kane.bOP2y ago
kane.b
kane.bOP2y ago
How would I do that though?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
kane.b
kane.bOP2y ago
alright thanks No, I want to limit it to so only some of the roles and then say "and [number more...]
kane.b
kane.bOP2y ago
kane.b
kane.bOP2y ago
Similar to this
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
kane.b
kane.bOP2y ago
yeah server info
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
kane.b
kane.bOP2y ago
huh? im confused now what should i do different
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
kane.b
kane.bOP2y ago
alright
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
kane.b
kane.bOP2y ago
kane.b
kane.bOP2y ago
this is mine
kane.b
kane.bOP2y ago
kane.b
kane.bOP2y ago
this is what i want to do so it cuts it off after a certain amount of roles, and then says "and 23 more" or how ever many more roles there are basically limiting it so it doesnt break the command
kane.b
kane.bOP2y ago
kane.b
kane.bOP2y ago
gotcha
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
kane.b
kane.bOP2y ago
alright thank you guys
Want results from more Discord servers?
Add your server