Commit Graph

77 Commits

Author SHA1 Message Date
Almeida
687e2ae672 refactor!: use AsyncEventEmitter instead of EventEmitter (#10710)
BREAKING CHANGE: The `BaseClient`, `Shard`, `ShardingManager`, and `Collector` classes now extend `AsyncEventEmitter` instead of `EventEmitter`.
2025-01-23 09:20:05 +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
11438c230b refactor!: Unpin @discordjs/collection (#10665)
BREAKING CHANGE: discord.js now uses @discordjs/collection v3—a major version increase.
2025-01-13 04:48:30 +00:00
ckohen
01e64b4e9a fix(actions): respect ratelimits on split docs upload (#10697)
* fix(actions): respect ratelimits on split docs upload

* fix: set failed on missing uploads
2025-01-12 19:05:35 +01:00
GodderE2D
28126cd375 fix: make version and package select openable on mobile (#10684) 2025-01-05 09:59:15 +00:00
Almeida
a6685a319e build: bump dependencies (#10671) 2024-12-31 21:31:34 +01:00
Jiralite
e89c6b66ac build!: Bump Node.js to 20 (#10616)
BREAKING CHANGE: Node.js 20 or above is required.
2024-11-27 16:37:35 +00:00
Jiralite
3a1b3cc8e1 build: Bump discord-api-types to 0.37.109 (#10619)
build: bump discord-api-types
2024-11-27 15:40:21 +00:00
Vlad Frangu
0374079c67 chore(deps): bump discord-api-types (#10611) 2024-11-23 00:07:57 +00:00
Jiralite
98153baf91 build: Update dependencies (#10601)
* build: update dependencies

* build: upgrade pnpm to 9.13.2
2024-11-19 10:30:06 +00:00
pat
9f8b9b1d66 feat(voice)!: add new encryption methods, remove old methods (#10451)
BREAKING CHANGE: This library no longer supports using `tweetnacl` as an encryption library due to Discord deprecating the algorithms that `tweetnacl` helped us support (read more [here](https://discord.com/developers/docs/change-log#voice-encryption-modes)). Please migrate to one of: `sodium-native`, `sodium`, `@stablelib/xchacha20poly1305`, `@noble/ciphers` or `libsodium-wrappers` unless your system supports `aes-256-gcm` (verify by running `require('node:crypto').getCiphers().includes('aes-256-gcm')`).

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2024-11-18 00:08:51 +02:00
Pablo
ed78e45706 build: bump discord-api-types version (#10575)
* chore: bump discord-api-types version

* fix: delete extra file
2024-10-27 06:15:28 +00:00
Qjuh
a65c762950 refactor!: fully integrate /ws into mainlib (#10420)
BREAKING CHANGE: `Client#ws` is now a `@discordjs/ws#WebSocketManager`
BREAKING CHANGE: `WebSocketManager` and `WebSocketShard` are now re-exports from `@discordjs/ws`
BREAKING CHANGE: Removed the `WebSocketShardEvents` enum
BREAKING CHANGE: Renamed the `Client#ready` event to `Client#clientReady` event to not confuse it with the gateway `READY` event
BREAKING CHANGE: Added `Client#ping` to replace the old `WebSocketManager#ping`
BREAKING CHANGE: Removed the `Shard#reconnecting` event which wasn’t emitted anymore since 14.8.0 anyway
BREAKING CHANGE: Removed `ShardClientUtil#ids` and `ShardClientUtil#count` in favor of `Client#ws#getShardIds()` and `Client#ws#getShardCount()`
BREAKING CHANGE: `ClientUser#setPresence()` and `ClientPresence#set()` now return a Promise which resolves when the gateway call was sent successfully
BREAKING CHANGE: Removed `Guild#shard` as `WebSocketShard`s are now handled by `@discordjs/ws`
BREAKING CHANGE: Removed the following deprecated `Client` events: `raw`, `shardDisconnect`, `shardError`, `shardReady`, `shardReconnecting`, `shardResume` in favor of events from `@discordjs/ws#WebSocketManager`
BREAKING CHANGE: Removed `ClientOptions#shards` and `ClientOptions#shardCount` in favor of `ClientOptions#ws#shardIds` and `ClientOptions#ws#shardCount`
2024-10-08 22:41:25 +01:00
Denis Cristea
8ab4124ef9 feat: implement zod-validation-error (#10534)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-10-06 14:43:06 +00:00
pat
24128a3c45 test: replace jest with vitest (#10472)
* chore: vitest config

* feat: vitest

* fix: do not actually create ws

* chore: config

* chore: lockfile

* chore: revert downgrade, up node

* chore: package - 'git add -A'

* chore: delete mock-socket

* chore: delete mock-socket

* fix: lockfile

---------

Co-authored-by: almeidx <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-10-06 14:26:53 +00:00
Denis Cristea
ab32f26cbb refactor: builders (#10448)
BREAKING CHANGE: formatters export removed (prev. deprecated)
BREAKING CHANGE: `SelectMenuBuilder` and `SelectMenuOptionBuilder` have been removed (prev. deprecated)
BREAKING CHANGE: `EmbedBuilder` no longer takes camalCase options
BREAKING CHANGE: `ActionRowBuilder` now has specialized `[add/set]X` methods as opposed to the current `[add/set]Components`
BREAKING CHANGE: Removed `equals` methods
BREAKING CHANGE: Sapphire -> zod for validation
BREAKING CHANGE: Removed the ability to pass `null`/`undefined` to clear fields, use `clearX()` instead
BREAKING CHANGE: Renamed all "slash command" symbols to instead use "chat input command"
BREAKING CHANGE: Removed `ContextMenuCommandBuilder` in favor of `MessageCommandBuilder` and `UserCommandBuilder`
BREAKING CHANGE: Removed support for passing the "string key"s of enums
BREAKING CHANGE: Removed `Button` class in favor for specialized classes depending on the style
BREAKING CHANGE: Removed nested `addX` styled-methods in favor of plural `addXs`

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
Co-authored-by: Almeida <github@almeidx.dev>
2024-10-01 19:11:56 +03:00
Qjuh
b20346f430 chore: unpin discord-api-types (#10524)
* chore: unpin discord-api-types

* chore: bump discord-api-types
2024-10-01 10:07:58 +00:00
Danial Raza
cda8d88ad5 build: bump discord-api-types to 0.37.100 (#10488)
* build: bump discord-api-types to 0.37.100

* build: fix lockfile

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-09-17 09:15:00 +00:00
Denis Cristea
8a74f144ac chore: pin builders in discord.js (#10490) 2024-09-06 13:12:19 +00:00
Jeroen Claassens
437437461e chore: bump to @favware/cliff-jumper v4.1.0 and fix changelog generation (#10459)
* chore: bump to @favware/cliff-jumper v4

* chore: cleanup changelogs

* chore: set `topo_order` to `false` for cliff config

* chore: clean cliff.toml diffs

* chore(changelog): fix missing / incorrect entries
2024-08-24 13:06:35 +00:00
Almeida
e2e71b4d09 build: bump dependencies (#10457)
* build: bump `@vladfrangu/async_event_emitter`

* chore: bump again + fixes

* build: bump types/node and some dev deps

* build: bump discord-api-types again

* style: remove unused eslint-ignore comment

* build: sync dependencies and update templates

* build: bump turbo

* build: vercel + vitest

* build: bump undici

---------

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2024-08-22 17:33:35 +02:00
Naiyar
3d37660107 build: bump discord-api-types to 0.37.96 (#10452)
* build: bump discord-api-types to 0.37.95

* feat: Add support for Automated Message nonce handling (#10381)

* Add support for Automated Message nonce handling

* Fix options property

* Address PR feedback

* Handled case where it was explicitly set to false for that iteration to not generate a nonce, and PR feedback

* Fix lint issue

* Fix lint issue

* Move to MessagePayload.resolveBody instead

* Fix test errors

* Update packages/discord.js/src/structures/MessagePayload.js

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

* PR feedback

* Merge

* Let and not const

---------

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

* feat(Attachment): add `title` (#10423)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* types: Fix wrong auto moderation target type (#10391)

types: fix wrong auto moderation target type

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* feat(builders): update to @sapphire/shapeshift v4 (#10291)

feat: update to @sapphire/shapeshift v4

* refactor(actions): safer getChannel calls (#10434)

* refactor(actions): safer getChannel calls

* chore: consistency

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>

* build: bump discord-api-types tp 0.37.96

---------

Co-authored-by: Jacob Morrison <jake.morrison24@gmail.com>
Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: Almeida <almeidx@pm.me>
Co-authored-by: Danial Raza <danialrazafb@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Jeroen Claassens <support@favware.tech>
Co-authored-by: DD <didinele.dev@gmail.com>
2024-08-20 08:42:13 +00:00
Jeroen Claassens
2d5531f35c feat(builders): update to @sapphire/shapeshift v4 (#10291)
feat: update to @sapphire/shapeshift v4
2024-08-19 18:15:30 +00:00
Almeida
bb71dc825e build: bump discord-api-types to 0.37.94 (#10446) 2024-08-19 13:26:00 +00:00
Almeida
432e9b8425 chore: pin /ws version in discord.js (#10427) 2024-08-08 21:55:34 +00:00
Danial Raza
dc13324ddc build: bump discord-api-types to 0.37.93 (#10404)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-07-31 19:35:01 +00:00
Jiralite
15021990e8 build: Bump discord-api-types to 0.37.90 (#10354)
build: bump discord-api-types

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-06-18 18:37:16 +00:00
Jiralite
346d1be72b build: Bump dependencies (#10322)
* build: bump dependencies

* build: update pnpm to 9.1.4
2024-06-05 09:42:33 +00:00
iCrawl
f5dd6879a2 chore: /ui react type dep 2024-05-24 01:55:14 +02:00
iCrawl
f9ba11eba3 chore: update nextjs 2024-05-24 01:47:07 +02:00
iCrawl
bb884fc260 chore: react compiler 2024-05-19 03:44:42 +02:00
Almeida
c7adce351a build: bump discord-api-types to 0.37.83 (#10238)
build: bump discord-api-types to 0.37.82
2024-04-30 23:04:00 +00:00
Almeida
c2e68ceaad build: bump discord-api-types to 0.37.82 (#10226)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-04-27 17:16:20 +00:00
iCrawl
6759f5b9c5 chore: deps 2024-04-16 21:44:21 +02:00
Qjuh
1c5de21a29 feat(api-extractor): support export * as ___ syntax (#10173)
* feat(api-extractor): support `export * as ___` syntax

* fix: typescript version
2024-04-16 08:35:34 +00:00
Almeida
ba6476d07e build: bump discord-api-types to 0.37.78 (#10201) 2024-04-01 17:55:45 +00:00
Qjuh
654f1a48b9 chore: remove ws dependency (#10180) 2024-03-31 14:09:38 +00:00
iCrawl
0d4c26ba4c chore: deps 2024-03-11 17:50:39 +01:00
iCrawl
0efd1bea46 fix: anchor link for events 2024-03-04 00:02:52 +01:00
iCrawl
79fbda3aac feat: local and preview detection 2024-03-03 02:30:08 +01:00
iCrawl
71bba547b6 refactor: docs ordering 2024-03-02 20:25:51 +01:00
Noel
18cce83d80 refactor: docs (#10126) 2024-02-29 04:37:52 +01:00
iCrawl
597340f288 docs: split docs.api.json into multiple json files 2024-02-06 17:24:18 +01:00
iCrawl
ae57d7facb chore: deps 2024-02-06 01:53:30 +01:00
Vinayak Kulkarni
9f8d7fe7b4 build: Update husky to v9 (#10102)
* refactor(dev-deps): migrate to husky v9

Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>

* revert: only core committers in package.json

* chore: remove hashbang 🎉

* chore: remove install from prepare script 

* chore: upgrade to latest minor

---------

Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
Co-authored-by: almeidx <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2024-02-03 22:06:19 +00:00
iCrawl
7b5c31b2bc refactor: fetch versions on the client 2023-12-20 23:21:49 +01:00
iCrawl
171cb182ed chore: deps 2023-12-19 14:33:04 +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
iCrawl
8f432400d8 build: multi-config build and dep update 2023-11-14 01:26:22 +01:00
iCrawl
01c63d2e0f refactor: switch to vercel blob for docs 2023-11-13 23:15:16 +01:00