sleepy-discord
sleepy-discord copied to clipboard
Calling getUser once results in error.
Calling this exactly once results in this error. getUser(id);
Error 404: The resource at the location specified doesn't exist Error 429: You've made too many requests Error 429: You've made too many requests Error 429: You've made too many requests
Also getUser(id)->username also crashes but for a different reason. Almost every get call does this including getServers, getUser, listMembers.
to get a 404, I'm going to guess that you may have used an invalid id, but I don't understand how you were able to get that. As for 429, that one is simple, you are hitting rate limits.
Happens first try no matter what. Just that one command. Empty project with just that one command and I get a rate limit error.
There's no reason I should get a rate limit error for ONE request.
Even calling auto servs = this->getServers();
once on startup causes a rate limit error.
Think I figured it out maybe. So getServers() "X-RateLimit-Remaining" header ALWAYS returns zero after being called.
Maybe don't return a "warning" is "X-RateLimit-Remaining" is EQUAL to zero AND response.statusCode equals 200?
OK, I'll add more conditions before signaling an warning.
oops pressed the wrong button, I was about to comment that this maybe that you can only do a get user once in a few seconds.