Commit Graph

24 Commits

Author SHA1 Message Date
1Computer1
00bae4fe6b refactor: remove extended collection (#6246)
Co-authored-by: iCrawl <buechler.noel@outlook.com>
2021-07-31 12:08:59 +01:00
Antonio Román
5ca97c9351 refactor: remove timer utilities from Client (#6113) 2021-07-16 13:31:25 +01:00
Sugden
1e8f01253e refactor: new node features (#5132)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-06-30 21:40:33 +01:00
Jan
f7643f7bbe feat: interactions (#5448)
Co-authored-by: izexi <43889168+izexi@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Advaith <advaithj1@gmail.com>
Co-authored-by: Shiaupiau <stu43005@gmail.com>
Co-authored-by: monbrey <rsm999@uowmail.edu.au>
Co-authored-by: Tiemen <ThaTiemsz@users.noreply.github.com>
Co-authored-by: Carter <carter@elhnet.net>
2021-05-07 17:22:33 +02:00
Alec Woods
9d2d60691e feat(Rest): better handling of global rate limit and invalid request tracking (#4711)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: Tristan Guichaoua <33934311+tguichaoua@users.noreply.github.com>
Co-authored-by: Papaia <43409674+Papaia@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-03-31 21:56:58 +02:00
Antonio Román
32fe72f909 feat(Rest): switch queue to AsyncQueue (#4835)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-09-25 23:42:24 +02:00
Papaia
5b39737d49 fix(lint): RESTManager warning (#4796)
Co-authored-by: Papaia <43409674+ItsPapaia@users.noreply.github.com>
2020-09-05 20:16:09 +02:00
Crawl
c065156a88 chore: consistency/prettier (#3852)
* chore: consistency/prettier

* chore: rebase

* chore: rebase

* chore: include typings

* fix: include typings file in prettier lint-staged
2020-02-29 14:35:57 +01:00
Amish Shah
f79f024343 fix: bots being unable to connect 2019-08-12 21:40:26 +01:00
Gus Caplan
42505b78c1 chore: add strict mode (#2974) 2018-12-03 15:19:10 -06:00
Isabella
be4d6f9dc3 feat: add ClientOptions#retryLimit (#2805)
* 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
2018-09-01 04:51:35 +02:00
Kyra
989c365ef1 fix: Better global ratelimit management (#2801)
* 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
2018-08-28 18:28:21 -05:00
Isabella
13f46b924b refactor: clean up rate limit handling (#2694)
* 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
2018-08-24 06:29:44 +02:00
bdistin
5afd77ab73 refactor: remove user bot methods (#2559)
* [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
2018-07-25 22:14:23 -04:00
bdistin
58e5017159 fix: ratelimits (#2615)
* 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
2018-06-23 16:08:40 -05:00
bdistin
99bd355522 refactor: RESTManager handlers to use collection (#2539) 2018-06-10 05:45:34 +02:00
Amish Shah
bd83bb9fd6 refactor: improve sweep performance 2018-05-02 18:09:51 +01:00
Amish Shah
b5f37728a7 feature: allow sweeping of inactive request buckets 2018-05-02 17:57:48 +01:00
Gus Caplan
cd54e9317f Time Difference in REST (#2057) 2017-10-27 14:36:53 +01:00
Gus Caplan
296046dbc6 remove ua manager (#2015) 2017-10-19 07:11:07 +02:00
SpaceEEC
68a30584db refactor: remove redundant Client#rest and obsolete RESTManager#destroy (#2022) 2017-10-11 02:29:50 +02:00
Gus Caplan
27ccad1f1c tinify webpacks (#1975)
* 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
2017-09-26 07:18:12 +02:00
SpaceEEC
ec4c98704f refactor: make use of destructuring for Constants (#1942) 2017-09-16 20:31:36 +02:00
Gus Caplan
18e3801bb7 lots of important stuff (#1883)
* lots of important stuff

* Update Constants.js
2017-09-04 17:49:44 +02:00