* feat: add ClientOptions#retryLimit
* hydra needs to learn how to code right
* a default would probably help
* move incrementor & update comment
* clarify docs on Infinity
* fix: better global ratelimit handling in RequestHandler
fix: Remove useless line
fix: Better global ratelimit management
* refactor: Changed RESTManager#globallyRateLimited to be a getter
* refactor: Remove RESTManager#globallyRateLimited getter
* docs: Updated comments to reflect latest changes
* refactor: clean up rate limit handling
* requested changes
* remove request mode option
* fix dupe requests
* hardcode reaction ratelimits
* suggested changes
* fix small thing
* re-add restTimeOffset
* move restTimeOffset a bit
* i swear i know english its my native language ok
* requested changes
* fix: a bit *too* pre-emptive with ratelimits, now less so
* fix: dapi error shoudl reject with path
* fix: make errors in execute catchable
* fix promise return
* rebase is hard
* fix: Capture stack traces in APIRouter to preserve async stack
* fix: Handle the stack trace better
* fix: Check if error is an instance of Error (5XX rejects with Result)
* fix: Error.captureStackTrace is not supported in all browsers
* [WIP] Remove user bots
* more backend userbot removal
* Add mfaEnabled back
* revert client presences store removal
* partially revert getAuth changes
* remove more no longer used children of ClientUserGuildSettings
* fix a bug with this pr and TextBasedChannel.applyToClass
* remove a syncGuilds reference
* more user bot data handling
* various guildSync cleanup
* bots can't call logout
Had the user/bot portions of the code mixed up. Though, does this need to be a promise anymore?
* make ClientManager#destroy() sync
It nolonger needs to be a promise, and nothing depended on it being a promise that I can tell.
* requested change
* Fix massive error
* no longer used as it's userbot only
* Add timeDifference calcs back into ratelimits
And fix x-ratelimit-reset is in seconds, not ms: https://puu.sh/AIXxY/9b3989b248.png
* mutate reset time with date header instead
* fix defaulting of reset and remaining
if the reset header is not available, then the reset time should be Date.now() instead of the difference between the date header and Date.now()
If the date header is null, fall back to Date.now() since it's the best we can do (this should never happen, but safer to handle it just in case)
if remaining is 0 we don't want to default it back to 1 since 0 is falsy
* Fix some missing doc strings
Mainly just readonly tags
* Return an error when guild#allowDMs is ran from a bot account, and fix some return types
* WebhookClient implements Webhook, doesn't extend it
* Fix Client#rateLimit docs not showing what it returns
Cause I wanted to handle this event only to see no return props 🤔
* Actually make Client#rateLimit show the right info
Its an object with all the info
* tinify webpack
* meme
* fix long version
* more changes
* even smoler
* fix up logic
* fix build
* undo changes to user agent manager because its not webpack'd anymore
* the heck
* fix stupid
* clean up browser rules
* typo