Randomly Fails at creating roles
I am very new to all of this. Im trying to create roles based on array of objects, meaning the object's name. This was working rather well before. Im not sure what I changed but it seems to fail during the guild.roles.create.
Sometimes I get one role, other times I get 5 roles created. All of my passed objects exist and are defined.
codeFlow, is just a function that prints to console.
9 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- 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!And what is being logged to the console?
It just stops after the first log to show the object and it's property. Im running it on debug in vs code and looking at the debug output.
Show the console output.
Ive run three times just now, and no issue. Is there a limit to how much discord will let you do certain actions? My bot is only in a test server
There are rate limits yes. If you’re trying to create too many roles at once that would be a possibility.
Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
- Note: if you initialize your Client as
bot
or other identifiers you need to use these instead of client
- If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebinThose may help figure out if it’s a rate limit issue.
ahhhh, I will add those thank you!