Jiralite
5e6bd4b3d7
build: Bump dependencies ( #11333 )
...
* build: bump dependencies
* fix: guide build
* build: amend package.json.hbs
* build: create-discord-bot
* style: formatting
* build: final change
---------
Co-authored-by: almeidx <github@almeidx.dev >
2025-12-06 22:55:07 +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
Denis-Adrian Cristea
68bb8af58a
feat(builders): multipart form data output support ( #11248 )
...
* feat(builders): multipart form data output support
* refactor: proper key management
* chore: add missing remarks
* chore: requested changes
* chore: rename encodables file
* chore: requested changes
* chore: requested changes
* chore: nits
Co-authored-by: Almeida <github@almeidx.dev >
* chore: requested change
* chore: requested change
---------
Co-authored-by: Almeida <github@almeidx.dev >
2025-11-19 21:59:51 +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
ckohen
368edeaaff
fix(rest): emit warning on HTTP 401 with non-zero code ( #11066 )
...
* fix(rest): emit warning on HTTP 401 with non-zero code
* fix: typos
Co-authored-by: Almeida <github@almeidx.dev >
* fix: explicit globalThis
---------
Co-authored-by: Almeida <github@almeidx.dev >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-08-29 10:33:17 +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
Crytek1012
2852a529cf
docs: update param wording for consistency ( #10930 )
2025-06-12 10:33:01 +00:00
Almeida
8e03af6eaf
feat: update @types/node to v22 ( #10926 )
2025-06-07 13:21:57 +00:00
Almeida
e094faf225
docs: add missing, fix existing ( #10842 )
...
* docs: add missing, fix existing
* refactor: new stuff
* fix: requested changes
* fix: use `@link` for `@mixes`
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com >
* chore: disable bad eslint rule
---------
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-06-02 17:35:43 +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
Almeida
78d512c347
docs: export all visible symbols ( #10760 )
...
* docs: export all visible symbols
* fix: discord.js except raw
* refactor: remove raw data types
* docs: add back discord.js tsdoc file
* refactor: remove underscores
* fix: merge
* docs(RPCRedis): make `promises` as internal
---------
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-05-26 17:41:08 +00: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
Vlad Frangu
42ce116226
chore(deps): bump discord-api-types ( #10841 )
...
* chore(deps): bump discord-api-types
* chore: tests
* chore: tests 2
* chore: replace ImageSize type with dtypes type
2025-04-22 17:12:34 +00:00
Jiralite
3b76c7072d
build: Bump Undici to 7.8.0 ( #10831 )
...
build: bump Undici
2025-04-10 13:40:46 +00:00
Noel
f580de8025
chore: upgrade deps ( #10824 )
2025-04-05 13:18:56 +02:00
Almeida
ab6a69401e
docs: remove hardcoded locale from links ( #10794 )
...
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-03-07 21:23:42 +00:00
Almeida
bb6767113f
feat: re-emit REST debug logs ( #10782 )
2025-02-25 06:20:10 +00:00
Almeida
670667d65b
feat: add auth option in api methods ( #10717 )
...
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
Co-authored-by: Denis-Adrian Cristea <didinele.dev@gmail.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-01-24 11:23: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
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
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
d869d9b3fe
style: fix up lint
2023-12-19 14:45:28 +01:00
Qjuh
adfd9cd3b3
refactor: use interfaces for AsyncEventEmitter event maps ( #10044 )
...
* refactor: use interfaces for AsyncEventEmitter event maps
* refactor: apply suggestions from code review and add tests
* refactor: better errors on missing dispatch types
2023-12-14 16:09:13 +00:00
Jiralite
e9ff99101b
docs: Remove hyphen after @returns ( #9989 )
...
docs: remove hyphen after `@returns`
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-21 17:16:51 +00:00
Vlad Frangu
6df233de14
feat: present x-ratelimit-scope for 429s hit ( #9973 )
...
* feat: present x-ratelimit-scope for 429s hit
* fix: get scope from headers for burst too
2023-11-16 10:49:05 +00:00
iCrawl
8f432400d8
build: multi-config build and dep update
2023-11-14 01:26:22 +01:00
Aura
4bc1dae36f
types: use wrapper utilities ( #9945 )
...
* types: use `Awaitable<T>` instead of `Promise<T> | T`
* types: use `JSONEncodable<T>` over raw definition
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-12 21:40:59 +00:00
Almeida
975d5f18ae
chore: use descriptive type parameter names ( #9937 )
...
* chore: use descriptive type parameter names
* refactor: requested changes
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-12 17:21:51 +00:00
Vlad Frangu
81e7866903
feat: expose Retry-After and sublimit timeouts in RatelimitData ( #9864 )
...
* feat: expose Retry-After and sublimit timeouts in RatelimitData
* chore: better docs?
* Apply suggestions from code review
Co-authored-by: ckohen <chaikohen@gmail.com >
---------
Co-authored-by: ckohen <chaikohen@gmail.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-12 14:36:12 +00:00
David Malchin
cf49f405b0
fix(REST): strip webhook tokens ( #9723 )
...
* fix(REST): strip webhook tokens
* fix(REST): implement requested changes
Co-authored-by: ckohen <chaikohen@gmail.com >
---------
Co-authored-by: ckohen <chaikohen@gmail.com >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-11-11 18:31:39 +00:00
Jiralite
c50809e206
docs: Fix "its" typo ( #9825 )
...
docs: fix "its" typo
2023-09-09 18:20:15 +00:00
Jiralite
778df45166
feat(CDN): Support emoji size ( #9787 )
...
* feat(CDN): support emoji size
* refactor: try to warn in all environments
* feat: add prefix
* refactor: better feedback message
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-09-02 09:56:09 +00: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
Almeida
8d97017458
feat: user avatar decorations ( #8914 )
...
feat(User): add avatar decorations
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
2023-07-13 20:33:38 +00:00
volcanofr
a531dc9f1c
RESTOptions: (really) small description update for cdn ( #9615 )
...
Small option update cnd REST.ts
I just add "``" to uniform cdn @defaultValue with others one (like api).
The link is not broken anymore, because it do not work anymore.
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-06-09 09:00:20 +00:00
Synbulat Biishev
1ab60f9da4
feat: support new username system ( #9512 )
...
* feat: support new username system
* docs(GuildMember#displayName): update
* fix(User#hasNewUsername): use User#discriminator
* feat(User#tag): add new username
* docs(User#tag): update
* docs(User#hasNewUsername): update
* docs: update
* feat(User#defaultAvatarURL): update
* feat: remove some newly added properties
* docs(User#discriminator): update
* docs(User#globalName): bad Copilot
* feat(User#displayName): return display name
* types(User#displayName): not a partial structure
* feat: add `calculateUserDefaultAvatarId` function
* docs(CND#defaultAvatar): update
* docs(CDN#defaultAvatar): update
* feat: change default avatar id to type
* feat: deprecate `User#tag`
* docs(CDN#defaultAvatar): update
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
* docs(User): update
Co-authored-by: Rodrigo Leitão <38259440+ImRodry@users.noreply.github.com >
* feat: update
* typing: update
Co-authored-by: Jan <66554238+vaporoxx@users.noreply.github.com >
* feat: change the param type to `Snowflake`
---------
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com >
Co-authored-by: Rodrigo Leitão <38259440+ImRodry@users.noreply.github.com >
Co-authored-by: Jan <66554238+vaporoxx@users.noreply.github.com >
2023-06-08 18:16:42 +00: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
7e875f6919
chore: refactor workspace
2023-05-03 02:14:22 +02:00
iCrawl
48cab844d4
build: switch to bundler moduleResolution
2023-05-01 13:14:13 +02:00
Jiralite
ab3328a0e2
chore: Include discord.js in the user agent string ( #9267 )
...
* chore: apply user agent string
* fix: enforce even in custom option
* fix: tests
* refactor: simpler way
* docs: add type
* Update packages/discord.js/src/client/BaseClient.js
Co-authored-by: Aura Román <kyradiscord@gmail.com >
* fix: prioritise `option` type check
* types: `static`
* feat: add runtime check
* docs: update default
* refactor: remove Bun
* Update packages/discord.js/src/client/BaseClient.js
Co-authored-by: Almeida <almeidx@pm.me >
* fix: extra whitespace issues
* refactor: `trimEnd()`
---------
Co-authored-by: Aura Román <kyradiscord@gmail.com >
Co-authored-by: Almeida <almeidx@pm.me >
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-04-01 22:26:44 +00:00
iCrawl
311cab2d3f
build(website): build site from db data
2023-04-01 02:50:24 +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
Jeroen Claassens
229ad077ff
fix(rest): remove const enums in favour of regular enums ( #9243 )
...
* fix(rest): remove `const enum`s in favour of regular enums
The motivation is that `const enum` produces ambient const enums when
compiling which in turn causes issues with TypeScript 5.x when `verbatimModuleSyntax`
is enabled.
Furthermore, the generally accepted best practice is to avoid `const enum`s
when writing libraries. Can back this up with statements from TS maintainers
if needed, I know they made them, I just can't be bothered to find the GitHub
links lmao. @vladfrangu will probably be able to find those links much easier
than me as it was also the motivation to remove `const enum`'s from discord-api-types
* refactor(rest): restore `const enum` for internal enum
---------
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-03-19 14:35:27 +00:00