Commit Graph

110 Commits

Author SHA1 Message Date
Jiralite
bdcb3e1df7 build: Upgrade pnpm-lock.yaml (#11036)
* build: upgrade pnpm-lock.yaml

* style: format
2025-08-09 21:45:57 +00:00
Almeida
08a61ca8e3 refactor(WebSocketManager)!: remove deprecated rest option (#10998)
BREAKING CHANGE: The `rest` option in the `WebSocketManager` constructor has been removed. Pass a `fetchGatewayInformation` function instead.
2025-07-27 11:49:29 +01:00
ckohen
6cdfa3864b ci: better release workflow (#10325)
* ci: better release workflow

* ci: simplify + use changelog

* ci(release): better parsing and exclusions

* ci(release): remove tree log

* ci(release): improve logs

* ci(release): properly check inputs

* ci(release): better promise handling

Co-authored-by: Aura <kyradiscord@gmail.com>

* ci: refactor release to use bun

* ci(release): whitespace

Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>

* ci(release): add dev release handling

* ci(release): fixes from testing

* ci(release): make the promise run

* ci(release): when specifying package, skip exclusions

* ci(dev): create-discord-bot dev release

* ci(release): improve changelog detection

* ci: fix typo and allow releasing branches

* ci(release): set make_latest for gh releases

* ci(release): add ssh_key so pushed tags run workflow

---------

Co-authored-by: Aura <kyradiscord@gmail.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-07-25 11:56:02 +02:00
Almeida
de2b2dd330 chore: bump dependencies (#10967) 2025-07-13 19:39:47 +00:00
Snazzah
8bdea6232b feat: implement DAVE end-to-end encryption (#10921)
* feat(voice): implement DAVE E2EE encryption

* chore(voice): update dependencies

* chore(voice): update debug logs and dependency report

* feat(voice): emit and propogate DAVESession errors

* chore(voice): export dave session things

* chore(voice): move expiry numbers to consts

* feat(voice): keep track of and pass connected client IDs

* fix(voice): dont set initial transitions as pending

* feat(voice): dave encryption

* chore(voice): directly reference package name in import

* feat(voice): dave decryption

* chore(deps): update @snazzah/davey

* fix(voice): handle decryption failure tolerance

* fix(voice): move and update decryption failure logic to DAVESession

* feat(voice): propogate voice privacy code

* fix(voice): actually send a transition ready when ready

* feat(voice): propogate transitions and verification code function

* feat(voice): add dave options

* chore: resolve format change requests

* chore: emit debug messages on bad transitions

* chore: downgrade commit/welcome errors as debug messages

* chore: resolve formatting change requests

* chore: update davey dependency

* chore: add types for underlying dave session

* fix: fix rebase

* chore: change "ID" to "id" in typedocs

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2025-07-13 17:02:56 +00:00
Qjuh
3cff4d7412 feat: @discordjs/structures (#10900)
* chore: init /structures

* feat: base structure

* feat: initial structures design attempt

* refactor(Structure): use unknown to store in kData

* feat(Structure): add Invite

refactor(Structure): patch to _patch

* refactor: symbol names and override location

* fix: don't possibly return 0 if discord borks

Co-authored-by: Synbulat Biishev <signin@syjalo.dev>

* refactor: use getter value instead of api

Co-authored-by: Synbulat Biishev <signin@syjalo.dev>

* refactor: cache createdTimestamp value

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

* docs: better docs for what's done so far

* feat: add Mixin

* refactor(User): remove bitfield getters and add displayName

* feat(structures): add Connection

* feat(structures): add Channel base

* refactor(Mixin): trace prototype chain, allow construction

* fix(structures): fix mixin behavior

* fix(structures): data optimization call behavior from perf testing

* feat: channel mixins

* chore: update deps

* feat: channels and mixins

* chore: more typeguard tests

* fix: tests and some other issues

* feat: add ChannelWebhookMixin

* fix: more tests

* chore: tests and docs

* chore: docs

* fix: remove unneccessary omitted

* chore: apply code suggestions

* refactor: change how extended invite works

* fix: type imports

* Apply suggestions from code review

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

* fix: tests

* chore: add jsdoc

* refactor: apply code suggestions

* fix: don't instantiate sub-structures

* fix: don't do null default twice

* chore: use formatters, add _cache

* chore: lockfile

* chore: move MixinTypes to declaratiion file

* fix: tests

* fix: don't include source d.ts files for docs

* feat: bitfields

* feat: more bitfields

* refactor: remove DirectoryChannel structure

* chore: apply suggestions from code review

* chore: remove unused import

* refactor: use symbol for mixin toJSON, remove _ prefix

* chore: apply suggestions from code review

* refactor: remove bitfield casts

* refactor: remove special case for threadchannel types

* fix: apply code review suggestions

* refactor: bitfields always store bigint

* fix: tests

* chore: apply suggestions from code review

* fix: lint

* refactor: conditional structuredClone

* Apply suggestions from code review

Co-authored-by: ckohen <chaikohen@gmail.com>

* fix: code review errors

* fix: lint

* chore: bump dtypes

* Update packages/structures/cliff.toml

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

* docs: link to VideoQualityMode

* chore: typo in comment

* chore: small nits in docs links

* chore: small nits

* docs: forgot one

* chore: update template

* chore: typos and things

* chore: apply suggestions from code review

* fix: tests and typeguards

* chore: don't clone appliedTags

* refactor: use a symbol for patch method

* fix: add missing readonly

* chore: remove todo comment

* refactor: use symbol for clone

* fix: add constraint to DataType

* chore: apply suggestions

* fix: dtypes bump

* chore: fix comment

* chore: add todo comment

* chore: mark bitfield as todo
chore: mark bit field as todo and edit readme

---------

Co-authored-by: ckohen <chaikohen@gmail.com>
Co-authored-by: Synbulat Biishev <signin@syjalo.dev>
Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-07-12 18:24:30 +00:00
Souji
bc6005f446 feat(guide): port legacy guide (#10938)
* feat: initial attempt at porting legacy guide

* feat: completion of legacy guide backport

* chore: lockfile shenanigans

* fix: handle svgs

* fix: replace svg with mermaid integration

* chore: format

* chore: remove unnecssary bullet

* chore: cleanup code highlights

* chore: explicit return

* chore: move display components after interactive components in sidebar

* chore: voice

* top link should be installation
* add docs link to sidebar

* feat: subguide-based accent styles

* chore: don't list faq twice

* chore: mention display components in interactive components

* fix: remove unoccs/order rule from guide

* chore: redirect to legacy guide instead of /guide root

* refactor: use `<kbd>`

* refactor: more kbd use

* Update apps/guide/content/docs/legacy/app-creation/handling-events.mdx

Co-authored-by: Naiyar <137700126+imnaiyar@users.noreply.github.com>

* chore: fix typos

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

* chore: fix typos

* chore: fix links regarding secret stores across coding platforms

* chore: fix typo

* chore: link node method directly

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

* chore: typos

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>

* chore: typo

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>

* fix: prevent v14 changes from being listed twice

* chore: prefer relative links

* chore: missed link conversion

* chore: missed link conversion

* chore: fix link

* chore: remove legacy code highlight markers

* chore: rephrase and extend contributing guidelines

* feat(setup): suggest cli flag over dotenv package

* chore: move introduction in sidebar

better navigation experience if the 'next page' in intro refers to getting started vs. updating/faq

* fix: replace outdated link

* fix: update voice dependencies

* chore: update node install instructions

* fix: list in missing access callout

* chore: match bun env file format

* chore: restore ffmpeg disclaimer

* fix: lockfile conflict

* chore: action row typo

Co-authored-by: Vlad Frangu <me@vladfrangu.dev>

* chore: no longer use at-next for pino

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
Co-authored-by: Naiyar <137700126+imnaiyar@users.noreply.github.com>
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
2025-07-08 13:01:50 +00:00
Superchupu
ee3ca6f7c6 refactor(create-discord-bot): replace deps with built-in apis (#10971) 2025-07-08 07:14:19 +00:00
Danial Raza
024ae5c566 build: bump discord-api-types to 0.38.15 (#10966) 2025-07-05 16:33:10 +00:00
Almeida
a5bd4cfe73 feat!: use zod v4 (#10922)
* feat: zod 4

* feat: zod v3, but v4

feat: validation error class

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

* chore: bump

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
2025-07-03 01:02:45 +01:00
Danial Raza
02fbb706aa build: bump discord-api-types to 0.38.14 (#10960) 2025-07-01 04:44:33 +00:00
Almeida
8e03af6eaf feat: update @types/node to v22 (#10926) 2025-06-07 13:21:57 +00:00
Qjuh
b03c65c34c refactor: using eslint-config-neon on mainlib (#10876)
* refactor: using eslint-config-neon on mainlib

* fix: lint

* fix: lint

* fix: the way we lint

* chore: lint some more

* fix: more lint changes

* fix: type tests

* chore: port eslint rule

* refactor: lintstaged doesn't need this

* fix: eslint was a bit too eager

* fix: forgot Client

* Apply suggestions from code review

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

* chore: more lint fixes

* fix: remove useless Boolean()

* fix: get docs back

* fix: snowflake docs

* refactor: don't use typescript lint rules

* fix: code review

* fix: tidy up disabled rules

* chore: code review

* chore: code review

* chore: code review

* fix: consistent spacing in typings

* fix: tests

* fix: unsort ErrorCodes

* chore: get comments back

* Update packages/discord.js/src/client/websocket/handlers/THREAD_LIST_SYNC.js

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

* fix: remove unused parameter

* fix: merge messed up types

* fix: more type mess from merge

* fix: generate script for ActionsManager

* fix: code review

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

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

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

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

* fix: replace is faster, unicorn is wrong

* fix: consistency

* fix: delete obsolete file

* fix: minor nit in test file

---------

Co-authored-by: Almeida <github@almeidx.dev>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2025-06-02 17:23:40 +00:00
iCrawl
762bbc6525 refactor(website): switch to dynamic only 2025-05-30 02:29:15 +02:00
iCrawl
c92a8c27a2 fix: sidebar behaviour when switching package/version 2025-05-15 17:11:47 +02:00
iCrawl
aa533efe26 feat: discord-api-types on docs 2025-05-13 01:33:48 +02:00
Qjuh
b3db92edfb feat(api-extractor): support multiple entrypoints (#10829)
* feat(api-extractor): support multiple entrypoints

* chore: initial support in generateSplitDocumentation

* chore: bring in line with upstream

* refactor: multiple entrypoints in scripts

* fix: split docs

* feat: website

* fix: docs failing on next

* fix: don't include dtypes for now

* refactor: don't fetch entrypoint if there is none

---------

Co-authored-by: iCrawl <buechler.noel@outlook.com>
2025-05-12 23:48:41 +02:00
Qjuh
75179fbf9f chore: bump zlib-sync to 0.1.10 (#10873) 2025-05-01 20:43:44 +00:00
Noel
2184085fda docs: guide setup (#10862) 2025-04-28 02:23:27 +02:00
Almeida
a4f3a2574d ci: update list of packages in codecov uploads (#10846)
* ci: update list of packages in coverage upload

* build: remove test dependencies

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-04-27 00:45:54 +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
Almeida
f0ea40586b build: bump discord-api-types to 0.37.120 (#10832)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-04-11 08:26:23 +00:00
iCrawl
e22a7bb505 ci: upload docs to cf 2025-04-11 00:55:57 +02:00
Noel
2e3bc69602 refactor: website facelift (#10823) 2025-04-10 22:02:37 +02:00
Almeida
1fe53c7ca2 chore: move pnpm settings to pnpm-workspace.yaml (#10828)
* chore: move pnpm settings to pnpm-workspace.yaml

* chore: remove contentlayer remains

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-04-10 17:42:05 +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
Denis-Adrian Cristea
0f89353443 refactor!: remove discord.js builders (#10529)
BREAKING CHANGE: Removed all builder extensions within discord.js
2025-03-05 14:34:49 +02:00
Lobo Metalúrgico
5c48979096 build: Update undici to 6.21.1 (#10743)
fix: undici bumping to 6.21.1

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-02-10 23:07:06 +00:00
Jiralite
6df42db33d build: bump discord-api-types to 0.37.118 (#10730) 2025-01-28 10:09:09 +00:00
Jiralite
3db8ce70a2 build!: Bump Node.js to 22.12.0 (#10726)
BREAKING CHANGE: Node.js 22.12.0 or above is required.
2025-01-26 14:56:39 +00:00
Jiralite
9b8b0f828c build: Properly add typecheck tests (#10722)
* build: exclude type tests from running

* refactor: use `tsc`

* test: fix broker test

* test: fix voice test

* test: fix builders test

* test: use vitest typecheck

remove unused test scripts
skip lib check
rm vitest.d.ts

* fix: remove tsd from core and ws

* fix: extend local tsconfig

---------

Co-authored-by: almeidx <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-01-26 14:28:45 +00:00
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