Almeida
5888663392
test: fix type errors ( #11325 )
...
* test: fix type errors
* chore: use MockedFunction
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-12-08 00:24:29 +00:00
Almeida
0aaba0305f
fix(undiciRequest): file uploading ( #11320 )
...
* fix(undiciRequest): file uploading
* fix: different approach
* fix: revert to the previous approach
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-12-03 14:40:15 +00:00
ckohen
f1bcff46b6
feat(rest): callbacks for timeout and retry backoff ( #11067 )
...
* feat(rest): callbacks for timeout and retry backoff
* test: add tests for callback utils
* test: fix typo
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com >
* fix(retryBackoff): efficient math
* docs: minor tweaks
* docs: captalisation
---------
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com >
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
2025-09-10 09:23:28 +00:00
Almeida
c3dc58169b
fix: attachment sending ( #11015 )
...
* fix: attachment sending
* test: add tests
---------
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
2025-07-30 10:53:44 +00:00
Danial Raza
9ff04820b3
feat: support user guilds ( #10962 )
...
* feat: support user guilds
* chore: add cdn test
* chore: suggested changes
* refactor: move to user primary guild to its own class
* docs: update description of `badgeHash` parameter
* chore: export UserPrimaryGuild
* refactor: revert to no `UserPrimaryGuild`
* fix: use key in data
* fix: both `in` and is truthy check
* docs: remove `-`
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
---------
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
2025-07-16 07:26:00 +00:00
Jiralite
1f0fe39156
refactor(CDN)!: Use an object for the constructor ( #10978 )
...
BREAKING CHANGE: The CDN class requires an object to construct.
2025-07-11 15:44:25 +01:00
Almeida
8e03af6eaf
feat: update @types/node to v22 ( #10926 )
2025-06-07 13:21:57 +00:00
Jiralite
2c35084ecd
feat!: Support animated WebP ( #10911 )
...
* feat: support animated WebP
* refactor: change the rest
* fix: remove redundant code
2025-05-27 10:18:30 +01:00
Danial Raza
d81b4be2cd
feat: add soundboard ( #10590 )
...
* feat: add soundboard
* types(PartialSoundboardSound): add `available`
* feat(VoiceChannelEffect): add `soundboardSound` getter
* types: improve return types
* docs: requested changes
* feat: support multiple audio file types
* types(GuildSoundboardSoundCreateOptions): add `contentType`
* types: add default and guild soundboard sound
* fix: requested changes
* docs: use `@fires` tag
* docs: remove misleading tag
* chore: requested changes and missing things
* feat: add send soundboard sound options
2025-04-25 19:43:17 +00:00
Idris
0c40bc195e
refactor(Emoji)!: make imageURL() change extension dynamically ( #10613 )
...
BREAKING CHANGE: Image URLs of emojis now automatically return GIF or static extensions.
BREAKING CHANGE: `CDN#emoji()` now has an `animated` required parameter.
2025-01-16 09:59:28 +00:00
ckohen
ae0265eefc
feat(rest)!: allow passing tokens per request ( #10682 )
...
BREAKING CHANGE: `RequestData.authPrefix` has been removed in favor of `RequestData.auth.prefix`
2025-01-13 05:36:05 +00:00
Jiralite
9fea0698af
fix: Correct guild member banner URL ( #10677 )
...
fix: correct guild member banner URL
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-01-02 08:19:33 +00:00
Almeida
b3d4259f8a
refactor!: remove deprecated CDN method overloads ( #10649 )
...
BREAKING CHANGE: Removed user avatar decoration overload from `CDN#avatarDecoration()`
BREAKING CHANGE: Removed non-object options overload from `CDN#emoji()`
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
2024-12-09 06:58:47 +00:00
Jiralite
97ffa201a2
test: Update deprecated emoji test ( #10607 )
...
test: update deprecated emoji test
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-11-27 08:31:11 +00:00
Jiralite
599ad3eab5
fix: Correct base path for GIF stickers ( #10330 )
...
* fix: correct base path for GIF stickers
* test: add sticker GIF
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-06-07 15:19:37 +00:00
Almeida
3b5c600b9e
feat(User): add avatarDecorationData ( #9888 )
...
* feat(User): add `avatarDecorationData`
* fix: remove options
* fix(User): check avatar decoration in equals() methods
* docs: Add full reference
---------
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-06-02 21:26:31 +00:00
Almeida
dc8f14967c
test: skip flaky rest test ( #10234 )
2024-04-27 19:11:03 +02:00
DD
278396e815
feat(REST): dynamic rate limit offsets ( #10099 )
...
* feat(REST): dynamic rate limit offsets
* chore: update tests
* chore: better doc comment
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
* fix: don't overlook globalReset
Co-authored-by: ckohen <chaikohen@gmail.com >
---------
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
Co-authored-by: ckohen <chaikohen@gmail.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-01-30 09:29:42 +00:00
iCrawl
aad82f088b
build: fix the messy dependency graph
2023-11-09 00:13:01 +01:00
iCrawl
6cd3adf030
chore: update deps
2023-11-06 21:38:45 +01:00
ckohen
8f4256db8a
refactor(REST): remove double classing ( #9722 )
...
* refactor(REST): remove double classing
BREAKING CHANGE: `REST` and `RequestManager` have been combined, most of the properties, methods, and events from both classes can now be found on `REST`
BREAKING CHANGE: `REST#raw` has been removed in favor of `REST#queueRequest`
BREAKING CHANGE: `REST#getAgent` has been removed in favor of `REST#agent`
* chore: update for /rest changes
2023-07-25 08:40:21 +00:00
Vlad Frangu
386f206caf
feat: no-de-no-de, now with extra buns ( #9683 )
...
BREAKING CHANGE: The REST and RequestManager classes now extend AsyncEventEmitter
from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
BREAKING CHANGE: DefaultUserAgentAppendix has been adapted to support multiple
different platforms (previously mentioned Deno, Bun, CF Workers, etc)
BREAKING CHANGE: the entry point for `@discordjs/rest` will now differ
in non-node-like environments (CF Workers, etc.)
Co-authored-by: Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com >
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
Co-authored-by: suneettipirneni <suneettipirneni@icloud.com >
2023-07-17 08:27:57 +02:00
ckohen
cdaa0a36f5
refactor(rest): switch api to fetch-like and provide strategies ( #9416 )
...
BREAKING CHANGE: NodeJS v18+ is required when using node due to the use of global `fetch`
BREAKING CHANGE: The raw method of REST now returns a web compatible `Respone` object.
BREAKING CHANGE: The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
BREAKING CHANGE: Many underlying internals have changed, some of which were exported.
BREAKING CHANGE: `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
2023-05-06 21:09:19 +02:00
iCrawl
48cab844d4
build: switch to bundler moduleResolution
2023-05-01 13:14:13 +02:00
ckohen
db8df104c5
fix(handlers): create burst handler for interaction callbacks ( #8996 )
...
* fix(handlers): create burst handler for interaction callbacks
* docs: use remarks instead of info block
Co-Authored-By: Almeida <almeidx@pm.me >
* refactor: move code duplication to shared handler
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
* Update packages/rest/src/lib/handlers/BurstHandler.ts
---------
Co-authored-by: Almeida <almeidx@pm.me >
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com >
Co-authored-by: Aura Román <kyradiscord@gmail.com >
2023-03-30 17:22:04 +00:00
Lioness100
1ba1f238f0
docs: fix typos ( #9127 )
...
* docs: fix typos
* indicies -> indices
* rename file
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-17 20:07:38 +00:00
Aura Román
8376e2dbcd
refactor: update makeURLSearchParams to accept readonly non-Records ( #8868 )
2022-11-28 09:20:27 +01:00
A. Román
3c231ae81a
feat: add AbortSignal support ( #8672 )
...
* feat: add `AbortSignal` support
* fix: move the expect earlier
* fix: pass signal
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-25 18:44:03 +00:00
iCrawl
3b7ba4062e
chore: fix leftover eslint exceptions
2022-09-01 21:26:09 +02:00
Suneet Tipirneni
edadb9fe5d
refactor: use eslint-config-neon for packages. ( #8579 )
...
Co-authored-by: Noel <buechler.noel@outlook.com >
2022-09-01 20:50:16 +02:00
iCrawl
8d8e6c03de
feat: use vitest instead of jest for more speed
2022-06-05 01:07:10 +02:00
iCrawl
6b8ef20cb3
style: cleanup tests and tsup configs
2022-06-04 15:21:57 +02:00
Khafra
e92b17d855
fix(REST): remove dom types ( #7922 )
2022-05-14 18:39:12 +02:00
Khafra
d1504f2ae1
fix: ok statusCode can be 200..299 ( #7919 )
2022-05-14 18:38:05 +02:00
Khafra
d1ec8c37ff
feat(rest): use undici ( #7747 )
...
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com >
Co-authored-by: ckohen <chaikohen@gmail.com >
2022-05-12 22:49:15 +02:00
iCrawl
bcf7f1cfad
chore: deps
2022-04-17 11:27:36 +02:00
A. Román
8eaec114a9
feat: add makeURLSearchParams utility function ( #7744 )
2022-04-12 17:14:30 +02:00
Suneet Tipirneni
72577c4bfd
feat: add API v10 support ( #7477 )
...
* feat: add API v10 support
* refactor: update deps
* chore: rebase fixes
2022-03-15 21:37:07 +01:00
Vlad Frangu
b9ff7b0573
fix(RequestHandler): only reset tokens for authenticated 401s ( #7508 )
2022-03-06 20:43:12 +01:00
Khafra
868e2f3230
rest: prefer arrayBuffer over buffer ( #7318 )
2022-02-16 08:34:54 +01:00
Suneet Tipirneni
0af9bc841f
fix(ci): ci error ( #7454 )
...
Co-authored-by: Almeida <almeidx@pm.me >
2022-02-13 13:37:41 +01:00
Tobias Peltzer
538e9cef45
fix: use png as extension for defaultAvatarURL ( #7414 )
2022-02-07 11:50:09 +01:00
ckohen
733ac82d5d
fix(rest): sublimit all requests on unhandled routes ( #7366 )
2022-02-05 14:30:55 +01:00
Suneet Tipirneni
1a6c5ab145
chore: use performance.now for time-based unit tests ( #7354 )
2022-01-27 10:05:14 +01:00
ckohen
67250382f9
refactor(files): remove redundant file property names ( #7340 )
2022-01-25 15:35:04 +01:00
Suneet Tipirneni
0951309b32
chore(cdn): default to animated images ( #7265 )
...
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
Co-authored-by: Almeida <almeidx@pm.me >
2022-01-17 13:14:03 +01:00
Noel
16938da355
chore: improve linting ( #7244 )
2022-01-11 12:30:08 +01:00
ckohen
86ab526d49
refactor(files): file data can be much more than buffer ( #7238 )
2022-01-11 12:29:48 +01:00
ckohen
c969cbf652
refactor(rest): rename attachment to file ( #7199 )
2022-01-08 00:49:34 +01:00
Noel
16390efe6e
chore: monorepo setup ( #7175 )
2022-01-07 17:18:25 +01:00