Commit Graph

28 Commits

Author SHA1 Message Date
iCrawl
391211040a chore: deps 2021-12-24 12:21:53 +01:00
Jake Ward
5e0a7d51fc feat(MessageAttachment): description (alt text) support (#6871)
Co-authored-by: D Trombett <maxtromb.dt@gmail.com>
2021-11-11 20:29:17 +01:00
Almeida
a194d9c37f refactor: use optional chaining (#6757) 2021-10-05 00:04:53 +02:00
Almeida
531b46c60d refactor: use the node: protocol (#6710) 2021-10-02 13:40:02 +02:00
Shino
5eb3553fd1 feat(Rest): expose https.Agent options (#6177)
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
2021-08-17 21:45:32 +01:00
Voltrex
d5e28c2298 refactor: replace dependency with initial implementation (#6310) 2021-08-06 13:15:51 +01:00
Advaith
54d6a3a070 feat(Sticker): updates, sticker packs, and guild stickers (#5867)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
Co-authored-by: Tiemen <ThaTiemsz@users.noreply.github.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: BannerBomb <BannerBomb55@gmail.com>
Co-authored-by: Noel <icrawltogo@gmail.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2021-07-20 00:17:21 +01:00
Alan
de384047b3 chore(ApiRequest): remove mention of var (#6125)
Co-authored-by: Alan <you@example.comalanlichen1@gmail.com>
2021-07-17 12:22:45 +01:00
Antonio Román
5ca97c9351 refactor: remove timer utilities from Client (#6113) 2021-07-16 13:31:25 +01:00
Joey Smalen
f200f14a40 feat(REST): append additional information to the required User Agent (#6112)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-07-16 12:27:12 +01:00
Advaith
135abccd9c feat(APIRequest): support setting global headers in HTTPOptions (#5586)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
2021-05-10 10:56:56 +02:00
Noel
0a591a9697 feat(Browser): remove browser � (#5113) 2020-12-14 13:56:16 +01:00
VoltrexMaster
9042d19c4e fix: filtering of string forms of null and undefined (#5075)
Removed null and undefined being filtered out in string forms which caused issues in `<client>.api`, issue: https://github.com/discordjs/discord.js/issues/5072
2020-12-13 03:13:52 +01: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
Carter
257371da28 feat(REST): allow options.query as URLSearchParams (#4143)
* feat: support query as URLSearchParams

* style: remove unnecessary comment

* patch: use const

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>

* feat: not reconstructing the search params

Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
2020-06-04 13:34:29 +02:00
thepheer
12187efdbd feat(DataResolver): prefer streams over buffers (#4075)
* feat(DataResolver): prefer streams over buffers

* feat(DataResolver): add `resolveFileAsBuffer`

Add `resolveFileAsBuffer` to use it in `resolveImage` which still requires Buffers to work.

* fix(DataResolver): make sure `resolveFile` always returns a Promise

* refactor(DataResolver): use for-await-of

* fix(DataResolver): use forked form-data which supports custom streams

* fix(APIRequest): use forked form-data in code too

Co-authored-by: - <5144598+-@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
2020-04-17 12:03:50 +02:00
SpaceEEC
a4f7e07b3b fix(APIRequest): only use form data when actually sending files (#3917) 2020-03-08 19:28:19 +01: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
Saya
e4309b23d5 feat: abort Requests that takes a lot of time to resolve (#3327)
* Add Request Timeout

* Add abort controller in packages

* Fix Lint Error.

* Fix Lint Errors

* Make Timeout Customizable & use finally

* Fixed a minor issue

* Fix eslint

* Update request timeout to use d.js client timeout methods.
2019-08-19 18:55:07 +02:00
SpaceEEC
00eb7e325a fix(ApiRequest): filter out null query values
Fixes #3183
2019-04-05 16:32:50 +02:00
bdistin
5e9bd786d1 refactor(APIRequest): utilize URLSearchParams (#3180)
* utilize URLSearchParams

* options.query can be undefined/null

* oops

* remembered what I intended
2019-04-05 11:32:19 +02:00
Gus Caplan
42505b78c1 chore: add strict mode (#2974) 2018-12-03 15:19:10 -06:00
Will Nelson
5e011dbc11 switch to node-fetch (#2587)
* switch to node-fetch

* remove useless var declaration

* remove method uppercasing

* rework concurrency

* Revert "rework concurrency"

This reverts commit ef6aa2697e.

* fix headers
2018-06-19 20:10:55 +02:00
1Computer1
01f1f1b58e Fix query string on requests after ratelimited (#2215)
* Fix querystring being appended multiple times when ratelimited

* Better way?

* Better better way

* Fix empty queries
2018-01-04 01:17:15 +01:00
Gus Caplan
296046dbc6 remove ua manager (#2015) 2017-10-19 07:11:07 +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
Gus Caplan
4d4d2f2db7 add agent support (#1973) 2017-09-25 20:46:19 +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