Commit Graph
2433 Commits
Author SHA1 Message Date
d634694c3f fix: update collector options.time and options.idle in resetTimer (#11534)
* fix(Collector): update options.time and options.idle in resetTimer

* fix: apply suggestions from code review

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
2026-08-31 21:25:15 +00:00
Asad Humayunandkodiakhq[bot] 5608023103 test(structures): add test for Emoji structure (#11509)
* test(structures): add test for Emoji structure

* test: use realistic snowflake ids

* test(structures): getters that rely on isIdSet return null if no id set

* style: compress into one test

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-08-31 20:48:09 +00:00
10f059e3ca fix: ignore None flags on serialization of bitfields (#11563)
* fix: ignore `None` flags on serialization of bitfields

* fix: parantheses

* Apply suggestions from code review

Co-authored-by: Almeida <github@almeidx.dev>

* chore: fmt

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-08-30 09:19:33 +00:00
Asad Humayun a81ed8a306 feat(structures): add Presences structures (#11411)
* feat(structures): presence structures

* feat(structures): add GatewayPresenceActivityTimestamps substructure

* feat(structures): add GatewayPresenceActivitySecrets

* feat(structures): add GatewayPresenceActivityParty

* feat(structures): add GatewayPresenceActivityEmoji

* feat(structures): add GatewayPresenceActivityButton

* feat(structures): add GatewayPresenceActivityAssets

* feat(structures): add ActivityFlagBitFields

* feat(structures): add GatewayPresenceActivity structure

* docs(structures): update class remark on GatewayPresenceActivityButton

* feat(structures): add GatewayPresenceClientStatus

* feat(structures): add GatewayPresenceUpdate

* docs(structures): update `GatewayPresenceActivity#flags` for clarity

* fix(structures): return correct value for getter on ActivitySecrets

* test(structures): add tests & use correct type on ActivityTimestamps

* docs: rm todo comment

* fix: correct incorrect implementation of party#id

* chore: rename structures

* feat(structures): update tests, comments, date getters

* feat: split `size` into 2 different getters

* test: update tests for new getters

* refactor(structures)!: use xDate convention in favour of xAt

* fix(structures): add `inviteCoverImage` getter + update tests

* test(structures): apply review feedback

* chore: use `dateToDiscordISOTimestamp` and cleanup tests

* feat: isArrayFieldSet typeguard & tidy up

* feat(structures): add URL getters, typeguards, update tests

* test(presence): review feedback

* test(presence): use realistic values

This uses values from the Discord API docs.

* test: rename tests to Presence instead of GatewayPresence

* test(structures): review feedback

* docs: use new discord docs links in jsdoc

* fix: address feedback for tests

Make some changes to all tests;
- use a standard beforeEach block to use a new instance on each test for robustness;
- check that the patched result contains the expected patched values as opposed to testing for any change across the structure, for accuracy.
2026-08-29 06:39:46 +00:00
spokodev a258a488b9 fix(util): cache nullish values in lazy() (#11564)
lazy() used defaultValue ??= cb(), so a callback returning null or undefined
was never cached and re-ran on every call, breaking the compute-once contract
(any side effect in the callback repeated). Track a called flag instead of
relying on value nullishness.
2026-08-27 14:01:43 +01:00
Denis-Adrian Cristeaandckohen 99af6d8bec feat(rest)!: add rejectOnRateLimit on a per-request basis (#11600)
BREAKING CHANGE: `RESTOptions#rejectOnRateLimit` now only accepts `boolean` or `RateLimitQueueFilter`

Co-authored-by: ckohen <chaikohen@gmail.com>
2026-08-17 13:13:35 +03:00
c9855614c4 feat: rpc (#11026)
* feat: rpc

* chore: update CODEOWNERS

* fix: linter rules

* chore: add rpc to workflows and readme

* chore: remove rpc tests folder

* chore: add package details from rpc repo

* docs: rpc docs readme

* chore: fix rpc license

* chore: remove vitest

* fix: rpc links

* build: dependencies

* docs: "id"

* chore: awkward doc spacing

* chore: lockfile

* chore: clean stuff

* fix: apply suggested changes

* chore: suggested changes

* chore: suggested changes

* chore: suggested changes

* fix: silly things

* chore: suggested changes

* chore: suggested changes

* chore: suggested changes

* chore: suggested changes

* suggested changes

* remove examples in favor of later guide additions

* add very basic guide for rpc

* meta config changes for guide

* guide changes

* suggested changes

* suggested changes

* Update packages/rpc/package.json

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>

* Update packages/rpc/package.json

* fix: revert version bumps, use esm

* fix regression from suggested change

* suggested changes

* forgot to remove extra image

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
2026-08-14 14:28:37 +00:00
Almeidaandkodiakhq[bot] 905445ec97 fix: prevent AbortSignal event listener leak (#11594)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-08-13 10:22:01 +00:00
Almeida b1a77045f1 types: fix Client#pings visibility and stale private declarations (#11597)
- `Client#pings` is documented as public in the JSDoc, shows up on the
  documentation site, but was typed as `private` for some reason
- rename `Client#packetQueue` to `incomingPacketQueue` since
  `packetQueue` doesn't exist
- remove `ApplicationCommand.isAPICommandData`, which seemingly never
  actually existed at runtime
2026-08-08 21:25:38 +00:00
Kushida 4b3f1c166d fix(builders): preserve empty attachment files (#11588) 2026-07-29 17:31:30 +00:00
2de90a7674 fix(core): webhook delete query type, removeMember await (#11483)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-07-20 11:28:46 +00:00
2037593d8d feat: file_types for builders (#11579)
* feat: `file_types`

* fix: .js extension

Co-authored-by: Almeida <github@almeidx.dev>

* fix: adding

* test: use `Reflect`

* fix: update deprecated usage

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-07-20 05:29:59 +00:00
Jiralite c35a06663e feat: file types for discord.js (#11580)
* feat: file types

* fix(ApplicationCommandNonOptions): make it actually work
2026-07-19 22:35:39 +00:00
Almeidaandkodiakhq[bot] c21f0af7db feat(BaseChannel): add permissions and appPermissions (#11577)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-07-19 16:20:25 +00:00
Jiralite 974a8c891f fix(makeURLSearchParams): allow arrays (#11578)
* fix: allow arrays

* refactor: comma
2026-07-19 14:44:49 +00:00
Jiralite c2d0781ddb build!: bump to Node.js 24 (#11566)
build: bump to Node.js 24
2026-07-17 14:05:28 +01:00
けんちる / Kento Watanabeandkodiakhq[bot] c73e2a76d1 fix(VoiceConnection): handle close codes that should not reconnect (#11567)
* fix(VoiceConnection): handle close codes that should not reconnect

* docs(VoiceConnection): update close code documentation

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-07-17 00:02:47 +01:00
9771d9ef55 fix: detect spoiler attachments with flag (#11560)
Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-07-16 22:46:30 +00:00
spokodevandkodiakhq[bot] e51936771f fix(builders): require select menu max_values to be at least 1 (#11565)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-07-16 22:39:17 +00:00
Jiralite 11a3c033c7 build: Bump discord-api-types to 0.38.50 (#11555)
* build: bump discord-api-types

* test: fix test

* build: discord-api-types 0.38.50

* test: ignore test
2026-07-16 22:19:52 +00:00
Kshitij Anuragandkodiakhq[bot] bf55791a6d feat(UsersAPI): add deleteApplicationRoleConnection() method (#11530)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-07-16 22:06:13 +00:00
Qjuhandkodiakhq[bot] 6e81ea771d chore(api-extractor): adapt upstream changes (#11520)
* chore(api-extractor): adapt upstream changes

* chore: guess it does fix our issue after all...

* chore: use `options` as synthetic name

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-07-08 05:45:18 +00:00
Qjuhandkodiakhq[bot] 7afe2015ce fix(scripts): correctly mark external docs on non-main tags (#11514)
* fix(scripts): correctly mark external docs on non-main tags

* fix: missing scoped package name

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-07-05 09:57:09 +00:00
b9c59f784e feat!: make voice receivers return AudioPacket classes instead of just Audio (#11432)
BREAKING CHANGE: Voice receive streams now emit `AudioPacket` instead of a raw Opus `Buffer`.

---------

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
Co-authored-by: Almeida <github@almeidx.dev>
2026-06-27 19:21:33 +01:00
Dhruv 4b450968ab fix(structures): zero-pad ms in dateToDiscordISOTimestamp (#11557) 2026-06-23 19:02:13 +01:00
Almeidaandkodiakhq[bot] a831287b9b fix(ShardingManager): default api url (#11541)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-06-17 10:46:30 +00:00
Jiraliteandkodiakhq[bot] c6c78868ce feat(guild): Support message search (#11552)
feat(guild): message search

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-06-13 20:11:23 +00:00
Jiralite c20fdd797a fix(invite): Return RESTDeleteAPIInviteResult on delete (#11551)
fix(invite): return `RESTDeleteAPIInviteResult` on delete
2026-06-13 12:13:26 +00:00
3d6121589f fix(RoleManager): allow null in RoleColorsResolvable to clear gradient colors (#11536)
* fix(RoleManager): allow null in RoleColorsResolvable to clear gradient colors

* docs(RoleManager): document nullable secondary/tertiary role colors

* refactor: split RoleColorsResolvable for create vs edit

* style: apply prettier formatting

* refactor: deduplicate RoleColors interfaces via inheritance

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>

* refactor: move colors out of RoleData

---------

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-05-26 16:38:08 +00:00
Almeida c95cbf2678 fix(StageInstanceManager#create): correctly resolve guildScheduledEvent (#11540) 2026-05-25 18:05:52 +00:00
Jiraliteandkodiakhq[bot] e721e51b03 ci(deprecateVersion): Fix empty message (#11491)
* ci: fix empty `message`

* refactor: move default again

* fix: move others too

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-05-23 06:55:49 +00:00
Qjuhandkodiakhq[bot] 0d5a0a69c3 fix: export all used types (#11526)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-05-23 06:18:45 +00:00
Almeida 07f1d8f5b3 feat(core)!: rename getAllMembers to getMembers with query support (#11484)
BREAKING CHANGE: getAllMembers has been removed. Use getMembers instead, which accepts an optional query parameter.
2026-05-23 02:05:55 +01:00
Almeidaandkodiakhq[bot] 37892ead4c feat(ClientApplication): add fetchActivityInstance method (#11481)
* feat(ClientApplication): add fetchActivityInstance method

* refactor: requested changes

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-05-22 22:53:39 +00:00
Qjuhandkodiakhq[bot] 9f111ed4df docs(Role): fix Role#tags docs (#11524)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-05-22 22:51:00 +00:00
c313bc58f1 docs: fix typos and duplicated words in comments and guide (#11502)
- fix "wether" -> "whether" and "dependant" -> "dependent" in RedisGateway JSDoc
- fix duplicated "the" in useful-packages guide
- fix duplicated "for" in two internal JSDoc param descriptions

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-05-22 22:47:15 +00:00
76478c4ba5 feat(ShardingManager): allow setting custom api url (#11471)
* feat(ShardingManager): allow setting custom api url

* Apply suggestion from @Jiralite

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-05-22 23:40:09 +01:00
28dd65d322 feat: add shared client theme support (#11454)
* feat: add shared client theme support

* Apply suggestion from @Qjuh

Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>

* chore: tests

* chore: format

* chore: apply suggestions from code review

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-05-22 22:31:00 +00:00
Denis-Adrian Cristeaandkodiakhq[bot] e490a230a3 fix(stringOption): zod validation (#11532)
fix: zod validation

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-05-21 15:46:49 +00:00
Qjuh 1e88dcdc05 feat(DMChannel)!: allow partial DMChannel without client user (#11443)
BREAKING CHANGE: `DMChannel#recipientId` is now nullable.
2026-05-20 19:05:16 +01:00
Almeidaandkodiakhq[bot] 40ce0791a8 feat(ApplicationsAPI): add getActivityInstance method (#11482)
feat(core): add getActivityInstance to ApplicationsAPI

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-04-24 17:11:18 +00:00
Dramex 8ea7c7c7e4 fix(collection): preserve ReadonlyCollection through tap/each (#11501)
* fix(collection): preserve ReadonlyCollection through tap/each

`each` and `tap` return polymorphic `this`, which TypeScript resolves
against the `Omit<Collection, ...>` portion of `ReadonlyCollection`
rather than the full intersection. That let callers reach `set` and
`delete` on the result of a chain started from a `ReadonlyCollection`:

    const ro: ReadonlyCollection<string, number> = new Collection(...);
    ro.tap(() => {}).set('x', 0); // compiled, mutated the underlying Map

The fix omits `each` and `tap` from the base `Omit` and re-declares
them on the `ReadonlyCollection` side of the intersection so the return
type narrows back to `ReadonlyCollection`.

Closes #10514

* test(collection): gate readonly-chain checks behind if(false)

Previously the `@ts-expect-error` lines still executed the `set` and
`delete` mutations at runtime, and the final `size === 1` passed only
because they happened to cancel out. Wrapping the assertions in
`if (false)` keeps the compile-time guarantee while the backing
collection is truly untouched, and adds a `get('a') === 1` check as
a belt.

* test(collection): move readonly type checks to *.test-d.ts

Addresses review feedback. The type-level assertions around tap() and
each() preserving ReadonlyCollection belong in a *.test-d.ts file so
they run through vitest's typecheck pass instead of runtime.

Replaces the if(false)-gated @ts-expect-error block in collection.test.ts
with expectTypeOf assertions in a new collection.test-d.ts. Covers both
the no-thisArg and with-thisArg overloads of tap and each.
2026-04-20 19:15:29 +00:00
2^1 58c5ebdd08 chore(readme): update related libraries link (#11487)
* fix(readme): related libraries link broke

* docs(readme): update all related-libs links
2026-04-13 16:20:06 +00:00
aa2767bd6f fix(MessagePayload): allow AttachmentBuilder in files payload (#11423)
* fix(MessagePayload): allow AttachmentBuilder in files payload

* fix: typo

* chore: apply suggestions from code review

Co-authored-by: Almeida <github@almeidx.dev>

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-04-09 09:27:02 +00:00
René 1f9affd979 perf(collection): avoid duplicated population of new collections (#11473) 2026-04-01 09:56:37 +00:00
Almeida 339b8b5655 chore: upgrade dependencies (#11470)
* chore: upgrade dependencies

* chore: upgrade some major dependencies

* chore: bump shiki to v4

* chore: bump actions dependencies

* chore: upgrade meilisearch dependency

* chore: set aria-hidden on GitHubIcon

* fix: use official github icon
2026-03-31 09:57:57 +01:00
Almeidaandkodiakhq[bot] 9b7ea5a1b7 fix: sendSoundboardSound return type (#11452)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-03-29 09:25:00 +00:00
Almeida 8bcf8c94e9 feat(GuildMember): add collectibles (#11468)
feat(GuildMember): add collectibles, fix partial update handling
2026-03-29 09:19:42 +00:00
22b820fbf2 fix(util): detect Cloudflare Workers in shouldUseGlobalFetchAndWebSocket (#11456)
Co-authored-by: Muhammad Ali <muhammadali@cloudflare.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2026-03-26 15:46:57 +00:00
JiraliteandVlad Frangu 2a067216c4 chore: Release @discordjs/voice 0.19.2 (#11450)
chore(voice): release @discordjs/voice@0.19.2

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2026-03-13 15:23:33 +00:00