#discord.js (monorepo)

7945 messages · Page 8 of 8 (latest)

vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/mainlib-fetch-g-member-limit
#
[discordjs/discord.js] New branch created: feat/14-mainlib-fetch-g-member-limit
vocal rampartBOT
#

Please describe the changes this PR makes and why it should be merged:

Since the introduction of discord-api-types on our docs site the linking needs to use the correct version of dependencies that aren't in the monorepo.

Fixes the wrong links on APIEmbed and similar on https://discord.js.org/docs/packages/builders/1.13.0/EmbedBuilder:Class#toJSON and others

Status and versioning classification:

vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/error-codes-missing
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/cdb-zod-upgrade
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/use-node-typescript
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/merge-builders-to-v14
vocal rampartBOT
#
[discordjs/discord.js] New branch created: ci/tag-removal
vocal rampartBOT
vocal rampartBOT
#

I request an unban from the discord. Find a ban fairly harsh, just because I pointed out someone was autistically focusing on words instead of the actual question. User: 211441083434008576

vocal rampartBOT
#
[discordjs/discord.js] New branch created: release-v14-node-22
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: 14/no-apps
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/support-new-timestamp-styles
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/add-new-timestamp-styles-v14
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Words have meanings, permissions are not roles, honoring that difference is not autistic, but just honoring the question.
You not seeing that you completely derailed that conversation while also being immensely rude and with a history of similar behavior has led to your exclusion from the server.

Since you still don't seem to understand that this is inappropriate and disturbing a learning environment, we have denied your appeal after internal discussion in the server staff team.
We may r...

vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: refactor/remove-base-client
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/circular
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: refactor/mainlib-for-builders-updates
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/no-prefer-global
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Hi. Some time ago I was banned after sharing an open-source package I built on top of Discord.js that adds JSX syntax for creating Discord components.

I had looked for a channel that seemed appropriate for that kind of project, posted it there, and was banned instantly without any warning or message. It wasn’t commercial, it wasn’t spam — it’s an open-source project and I don’t earn anything from it.

If the issue was breaking a rule, I’m sorry — reading rules is different from memorizing ev...

vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/author-emoji-fetch
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/sort-package-versions
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/pkg-entrypoint-link
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/emoji-author-14
vocal rampartBOT
#

I've been adopting Discord.js's way of naming enum values—PascalCase for both the enum object and its value names—but I've made the discovery recently that the convention, according to a Stack Overflow answer with a few notable sources, is PascalCase for the enum and SCREAMING_SNAKE_CASE for the value names. I quite favor this convention and have been adopting that instead, as it differentiates values from the rest of the nota...

#

I've recently discovered that VSCode highlights SCREAMING_SNAKE_CASE properties differently from PascalCase:

VSCode Syntax highlight test

Makes one of the bigger reasons why I'd prefer enum properties cased like such. I, however, haven't yet found any other syntax highlighter that does this, e.g. GitHub's markdown:

// Syntax highlight test
const enumTest = Enum.SOME_VALUE;
const miscTest ...
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/guide-typos
vocal rampartBOT
#
[discordjs/discord.js] New branch created: refactor/this-name
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/errors-2
vocal rampartBOT
#

That is absolutely awful in terms of library behavior. That snippet effectively means that if you pass both files and attachments at the same time, it's a guaranteed API error, unless it's a message edit and the elements the user passed to the attachments array specifically refer to existing attachments.

In essence, this renders the attachments field as edit-only, we're just completely taking over it with this behavior, largely hiding how the API payload works too (which I am not f...

vocal rampartBOT
#

No. This isn't about hiding thihgs, it's allowing the user to easily pass garbage. AttachmentBuilder on its own is fundamentally different from what you want, it removes your granular control of the files/attachments fields, it ties them together completely. There is no way when using it to get non-sense miss-matched arrays. All the more so when you use MessageBuilder

vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: Jiralite-patch-1
#

Before the monorepo, discord.js was only the discord.js package. The pull request template made sense (test your API changes, shout if your changes are breaking, and more).

Now, it contains packages like @discordjs/brokers, @discordjs/actions, the api-extractor packages, as well as the website and guide applications. Semantic versioning doesn't really apply to these, and testing API changes certainly doesn't apply for the websites.

I'm moving towards removing the file. At the very least...

vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/mixing-subcommands
vocal rampartBOT
#
[discordjs/discord.js] New branch created: refactor/validation-on-chatinputcommand
vocal rampartBOT
#

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt


This section details on the original issue you should resolve

Refactor chat input command subcommands overrides
Investigate whether the validation override can be changed to false.

https://github.com/discordjs/discord.js/blob/02fc101069aed994f7ee4579d114706047025ddd/packages/builders/src/inte...

vocal rampartBOT
#

I just wanted to report a small bug in the discord.js module, but it turned out that I was banned from the discord.js server (I don't even know why, because I don't even participate there, I only report bugs sometimes, I'm only there for update announcements). Could I get unbanned? Or at least find out what the ban is for?

The problem is that I logged into Discord today for the first time in a week.

vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/label-limits
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/14-labels
#
[discordjs/discord.js] New branch created: fix/rest-file-uploads
#
[discordjs/discord.js] New branch created: test/builders-validation
vocal rampartBOT
#
[discordjs/discord.js] New branch created: guide/upating
vocal rampartBOT
vocal rampartBOT
#

Tbh the global dispatcher being a problem is a major issue, but yeah. Why not just instantiate Agent once outside the function call and do ??= like the original commit?

Done.

Yes there's the potential to set the global dispatcher later than importing the strategy though...

Honestly, don't think this is a problem at all. The fact that undici is being used here is an implementation detail, and we have an official way of providing an agent if the user wants (via the agent option o...

vocal rampartBOT
#
[discordjs/discord.js] New branch created: test/type-errors
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/deprecated-buffer-slice
vocal rampartBOT
#
[discordjs/discord.js] New branch created: refactor/embed-length-util
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/cliff-jumper-schema
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/readme-upload
vocal rampartBOT
#

When I suggested removing the imports from built-ins, I was referring to standard globals (URL, URLSearchParams, Blob, etc.).

I think we should keep the node-specific things imported still. While they will (probably) work on other runtimes without the explicit import, I think it's better in this case to have an explicit import so it's extremely clear that we are expecting the implementation from/for node.


Additionally, I found some other globals which are still being imported whi...

vocal rampartBOT
#
[discordjs/discord.js] New branch created: build/dep-bump
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/upgrade-storybook
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/guide-turbopack-prod-build
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Additionally, I found some other globals which are still being imported while skimming over: File, Blob, and performance.

Unfortunately, there's no ESLint rules for those. Even so

  • I could not find any instances of File being imported. Maybe my search was improper?
  • Blob in only imported within REST once for undici request, removing it poses the following problem:
Argument of type 'Blob' is not assignable to parameter of type 'BodyInit | undefined'.
  Property 'sli...
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/vitest-v4
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/allow-empty-allowed-mentions
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/bits-and-bobs
#

Pull request overview

This PR updates project dependencies and refactors the uploadSearchIndices GitHub action with improved type safety and error handling.

Key Changes:

  • Updated pnpm to 10.25.0 and various dependencies (typescript-eslint, vercel, lucide-react, vite, etc.)
  • Removed unused immer dependency and eslint plugins (eslint-plugin-import, eslint-plugin-jsdoc)
  • Upgraded meilisearch from 0.38.0/0.53.0 to 0.54.0 and refactored the upload action to use the updated API
  • ...
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/workflow-updates
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/string-option-validations
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/readme-upload
vocal rampartBOT
vocal rampartBOT
#

<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: skip review by coderabbit.ai -->

[!IMPORTANT]

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration...

#

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Identify and suggest improvements to slow or inefficient code


✨ Let Copilot coding agent [set things up for you](https://github.com/discordjs/discord.js/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure instructions for this repository as documented in [Best practices for Copilot%...

#

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Identify and suggest improvements to inefficient code


✨ Let Copilot coding agent [set things up for you](https://github.com/discordjs/discord.js/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure instructions for this repository as documented in [Best practices for Copilot coding...

vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/lockfile
vocal rampartBOT
#

Hello, REST is useful for making calls to the discord rest API, as it will handle the rate limits, retries, bucket changes, etc.

The problem with it is that it won't provide information to the developer about the current status of the buckets, the actual rate limits. As a consequence it's impossible to nicely manage rate limits beforehand.

Example: Editing a message.
Suppose we are editing a message every few ms, let's say we are updating the current weather condition, the temperatur...

vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/index-lower-concurrency
vocal rampartBOT
vocal rampartBOT
#

No? According to docs that's "A function that determines whether the rate limit hit should throw an Error". I'm talking of having information about the rate limits before hitting the limit.
If you do a manual request you'll get headers such as

  • x-ratelimit-remaining
  • x-ratelimit-limit
  • x-ratelimit-reset-after
    These are present in the responses of any request to the API. If you know how many requests you've got left, and when is the limit resetting you can prevent 429 and queuing s...
#
[discordjs/discord.js] New branch created: feat/core-guild-role-member-counts
#
[discordjs/discord.js] New branch created: feat/guild-role-member-counts
vocal rampartBOT
#

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Overview

As part of the greenfield rewrite plan for discord.js, we need to expand the @discordjs/structures package with missing entity structures. This PR focuses on Sprint 1: adding Guild-related structures and additional bitfields that are foundational for most bot functionality.

Current State

The `packages/structur...

vocal rampartBOT
#

We very deliberately abatract this away from you. You can indeed accomplish what you want by using rejectOnRateLimit. With your example in fact, simply wrapping your message edit call with a try..catch block, where errors other than Ratelimit are discarded accomplishes exactly what you desire.

Even beyond that basic example, you can accomplish just about every reasonable usecase I can think about. For the record, your use case is not actually reasonable, it's API abuse, I entertained it fo...

vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/bump-deps-esm
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/bump-opus
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/gracefull-github-data-err
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: refactor/remove-reexport
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/v15-proper-structure-for-authorization-map
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: guide/membersarrive
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/emoji-predicate-custom-emoji-length
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Package

@discordjs/voice version 0.19.0

Description

The DAVE protocol availability check in createDaveSession() uses strict equality (===) when checking if getMaxProtocolVersion() returns null. However, when the @snazzah/davey library is not installed, getMaxProtocolVersion() returns undefined instead of null, causing the check to fail and preventing voice connections from working.

Root Cause

Location: dist/index.mjs around line 1405

Current code:

vocal rampartBOT
#
[discordjs/discord.js] New branch created: voice/make-davey-required
vocal rampartBOT
vocal rampartBOT
#

Are the semantics of a collection that much more desired here rather than a plain object? Even with plain module augmentation I still think objects are a bit more desirable.

There's a silly argument to be made about performance, assuming this is still valid, but other than that, I just find the semantics to be better?

As it stands, you're overloading get and has, which goes to imply that's the main interaction we're expecting users to have with the...

vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/builders-disable-option-validation
vocal rampartBOT
vocal rampartBOT
#

I have a usecase in which i would want to add or remove user's role if the server tag changes. On searching i found this discussion https://github.com/discordjs/discord.js/discussions/10954#discussion-8495120 which mentions this:

This feature is not documented by Discord. It currently exists in the API, however. It will be added to discord.js once documented.

Just wanted to know if this is available in discord.js now in Jan-2026 because the date on this is July-2025?

vocal rampartBOT
#

As of January 2026, this is unfortunately still not possible for real-time detection.

The Reason: While the Server Tag feature exists in the client, the Discord API currently does not send a Gateway Event when a user changes their Server Tag.

This means that even though the data exists, Discord does not "notify" the bot when a change happens. Without this specific event trigger, discord.js (or any other library) cannot listen for the change to automatically add or remove roles in real-t...

vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

I have no idea where @HaskaZuki got that information from, but it's wrong and sounds like LLM garbage.
This information is available in the userUpdate event in discord.js and GUILD_MEMBER_UPDATE on the Discord gateway. [^1]

To confirm this, i tested with the below code in discord.js version 14.25.1 and received the attached log.

client.on(Events.UserUpdate, (pU, nU) => {
	console.log({ pU: pU?.primaryGuild, nU: nU?.primaryGuild });
});
application-1  | {
appli...
#

Sidenote: since Discord does not send the "old" user, it has to be retrieved from cache. If the previous user is not cached there is no way to know what the user's previous state was. You can opt into partials, however you will not be able to determine what exactly the update was (username change, tag change, ...). You can still determine the "now" state and see if the user (still or newly, indistinguishable) represents a specific guild.

More on partials: https://discordjs.guide/legacy/pop...

#

Thanks for the correction @almostSouji

My previous assumption was based on the fact that this feature remained undocumented for so long. I was under the impression that the Server Tag change was still a 'silent' client-side update that didn't trigger a Gateway event, which is why I thought real-time detection wasn't possible yet. I clearly missed the latest update on how "primaryGuild" is being handled in the recent versions.

I incorrectly assumed that for a bot to see a Server Tag cha...

vocal rampartBOT
#

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt


This section details on the original issue you should resolve

voiceServerUpdate event not exists in ClientEventTypes
Another problem. voiceServerUpdate event not exists in ClientEventTypes

_Originally posted by @Pavel-Boyazov in https://github.com/discordjs/discord.js/issues/11121#is...

vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/emit-voice-server-update
#
[discordjs/discord.js] New branch created: docs/missing-app-permissions-doc
vocal rampartBOT
vocal rampartBOT
#

Which package is this bug report for?

voice (@discordjs/voice 0.19.0)

Issue description

DAVE E2E encryption handling in @discordjs/voice 0.19.x is broken in practice — bots enter reconnect loops and capture zero audio on voice channels with DAVE enabled (now the default on most channels).

This may be related to previously closed issues #11384 and #11387, but the core problem persists: voice connections are unusable.

Steps to reproduce

  1. Install @discordjs/voice 0.19.0 + ...
vocal rampartBOT
#
[discordjs/discord.js] New branch created: build/deps
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Nothing to add to the initial denial from the end of last year:

Words have meanings, permissions are not roles, noticing that difference is not autistic, but just honoring the question.
You not seeing that you completely derailed that conversation while also being immensely rude and having a history of similar behavior has led to your exclusion from the server.

Since you still don't seem to understand that this is inappropriate and disturbing a learning environment, we have de...

vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Logs: https://github.com/discordjs/discord.js/actions/runs/22245979203/job/64359888761

Running this locally with logs, I see this:

{
  pkg: "@discordjs/docgen",
  version: "0.12.1",
  devTag: "dev",
  timestamp: 1771638836,
  commitHash: "77e767277",
}
 ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT  None of the selected packages has a "release" script
79 |                    } else if (dry) {
80 |                            info(`[DRY] Bumping ${pkg.name} via git-cliff.`);
81 |                      ...
vocal rampartBOT
#

It's possible there's an oversight with add being so highly-responsible (i.e. functioning as more of an upsert).

I think that this is fine. My thought here is that there is a high chance that an async cache does not store our constructed objects, but rather the raw json. This means that get needs to construct from json anyways (hence your StructureCreator).

I see why it's called add rather than upsert I think? Because it deals with raw data when nothing else does?
Given this, I'd either l...

vocal rampartBOT
#
[discordjs/discord.js] New branch created: build/14-deps
vocal rampartBOT
#

I feel like caches should deal solely with storing the raw data from Discord, and not also mix with creating structures based on it.

I also feel like requiring cache entries to have an id property can become problematic, but I also know that basically all the structures we store have an id property so it'll probably be fine


I also don't know how to feel about Cache#add. It does resemble [Map#getOrInsertComputed](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Glo...

vocal rampartBOT
#

I feel like caches should deal solely with storing the raw data from Discord, and not also mix with creating structures based on it.

The consideration here is primarily that it vastly simplifies patching logic. It is fair to say that they shouldn't be interacting with high-level constructs, but this means that the caller needs to be responsible for:

  1. Getting the raw data
  2. Constructing the appropriate structure
  3. Calling kPatch
  4. Storing the new one

This isn't necessarily the end o...

vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Hey there d.js community, i haven't been active in developing Discord bots for like months and kind of ended the projects i was making after getting banned. but finally started to get back into developing bots because of Discord buttons v2. I'm pretty confident I got banned because I was trying to bypass a timeout (could be wrong tho, its been awhile). I do apologize for my previous actions, as they won't happen again if you let me back in or not. Anyway, I appreciate your consideration and h...

vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Another regression caused by the mentioned pull request, since you're touching this area of MessagePayload
It is not currently possible to edit a message's attachments (e.g., removing all the attachments), as it causes:

/home/cyph/discord.js/packages/discord.js/src/structures/MessagePayload.js:210
      attachments.push(
                  ^

TypeError: Cannot read properties of undefined (reading 'push')
    at MessagePayload.resolveBody (/home/cyph/discord.js/packages/discord.js/src...
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/private-docgen
vocal rampartBOT
vocal rampartBOT
#

One question I have is this: the way this RFC is designed and how my POC PR was made is that the cache can store the structures directly or decide to store the raw json and reconstruct the structure on get.

  • Do we want to allow that, leaving users under the assumption the structures would update like they do currently, although they won't because patching means cloning?
  • or do we want to always store raw JSON and always reconstruct? Then the structureCreator can be moved to manager and cac...
vocal rampartBOT
#

Another question came up. With stuff like Reactions or Embeds that are substructures of Message:

  • does the Message cache store all of those and the implementation needs to account for separating them for storage/recombine them on get() or does the structure get a manager itself again responsible for interacting with and storing its substructures?
  • does the Cache need information about the place the structures to be cached exist (e.g. the message id for caching a reaction) or does the struct...
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/proxy-container-to-apps
#

What happened

When connecting to a Discord voice channel with @discordjs/voice 0.19.0, an unhandled promise rejection occurs intermittently, crashing the entire Node.js process. The error originates from VoiceUDPSocket.ts during the IP discovery phase.

Stack trace

Error: Cannot perform IP discovery - socket closed
    at Socket. (@discordjs/voice/src/networking/VoiceUDPSocket.ts:167:38)
    at Object.onceWrapper (node:events:621:28)
    at Socket.emit (node:events:519:35)
    a...
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Expanding on the above. For a concrete example, let's assume a cache key messages:<message_id> for message data storage by a Guild Message Manager.
In this case, would it keep the "author" data (which is a user, which might end up duplicating the data of users:<user_id>, potentially causing staleness issues..), or would that be extracted out for it to be solely stored on users:<user_id> (by a User Manager). If extracted, how do we link the author back to the message? (note that the Mess...

vocal rampartBOT
vocal rampartBOT
#

This changes the documentation workflow on v14 branch to only work on tags (which it already did anyway, since the only branch it runs on is main) and make sure it runs the main workflow where necessary.

This should fix the docs regression where linking to the source code of re-exported members incorrectly linked to generated dist/*.d.ts files of the imported subpackages instead of the actual source.

vocal rampartBOT
#

Which package is this bug report for?

voice (@discordjs/voice 0.19.0)

Issue description

During DAVE E2E encryption, 34% of Opus voice packets are silently dropped during MLS key transitions. No errors are surfaced to the consumer — packets simply vanish. This makes voice receive unreliable for any application that processes speech (STT, recording, moderation).

Separated from #11419 per @Qjuh's request — this is a distinct issue from the reconnect-loop behavior reported there.

...

vocal rampartBOT
#

Thanks for the correction @Snazzah — you're right. I referenced the py-cord comparison from the original issue (#11419) without verifying their DAVE support status. That comparison is invalid and I've struck it from the issue description.

The core finding stands independently of any cross-library comparison:

Over 55 seconds of continuous speech with @discordjs/voice 0.19.0 + @snazzah/davey 0.1.10:

  • 272,894 bytes captured out of ~412,500 expected (64kbps Opus)
  • **34% of packets sil...
#

Following up with a deeper analysis of the captured PCM data.

Segment size distribution is bimodal

25 segments over 74.1 seconds show two distinct populations:

Group Count Mean size % of segments
Tiny (<2KB) 7 772 bytes 28%
Normal (≥2KB) 18 14,860 bytes 72%

That's a 19× difference between groups. Coefficient of variation is 98% — far outside what's expected for continuous speech (typically 10–20%).

Thre...

vocal rampartBOT
#
330

It seems like you're encountering a common issue with short audio buffers on cloud environments like AWS EC2. This usually happens because the UDP packet stream doesn't have enough time to stabilize before the audio resource ends, or due to resource throttling on T2/T3 instances.

Here are a few things you can try to resolve this:

Enable Inline Volume: Even if you don't change the volume, enabling inlineVolume forces the resource to be processed through a transformer, which sometimes hel...

vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/remove-file
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

@discordjs/voice 0.19.0: DAVE audio receive decryption fails — DecryptionFailed(UnencryptedWhenPassthroughDisabled)

Note: This may be a duplicate of or related to discordjs/discord.js#11419. Filing with additional diagnostic data.

Bug

After successfully connecting to a DAVE-enabled voice channel with @snazzah/davey installed, incoming audio packets cannot be decrypted. All voice capture attempts result in empty transcription because the raw audio is corrupted/undecryptable.

...

vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Hi, about 2 years ago, I was hacked and banned from many servers. I am developing a bot, so I would like to get an unban on your server. I would like to point out that I was also banned from the Discord Developers server, but I have already successfully unbanned it there. I hope that I can also get unban on your server.
id - 992686529652736000

vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/core-send-soundboard-sound-return
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/perms-split-finish
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Summary

Fixed spelling error in packages/api-extractor/CHANGELOG.md line 2665. Changed 'Seperated' to 'Separated'.

Details

  • File: packages/api-extractor/CHANGELOG.md
  • Change: Line 2665 in version 1.1.14 entry
  • Before: 'Seperated the ApiItem initialization...'
  • After: 'Separated the ApiItem initialization...'

Why This Matters

This typo appears in the public CHANGELOG viewed by 100k+ discord.js developers when reviewing release notes. Fixing spelling errors in C...

vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/guild-member-collectibles
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/bump-deps
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/sm-custom-api-url
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: feat/activity-instance
#
[discordjs/discord.js] New branch created: feat/core-activity-instance
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/core-misc
#
[discordjs/discord.js] New branch created: feat/core-thread-members-query
vocal rampartBOT
#

When building AI chatbots on Discord, streaming LLM responses requires repeatedly calling message.edit() which hits rate limits quickly.

Request: A built-in streaming message helper that batches edits intelligently (e.g. every 500ms) to show real-time AI generation without hitting Discord rate limits.

Use case: AI agent platform with Discord channel adapter that streams Claude/GPT responses in real-time.

vocal rampartBOT
#

It won't matter whether you call message.edit(), stream a response, do it through an MCP, make a CLI, or whatever you want to edit your message, as it'll all translate to the same requests to Discord, so you'll still hit the ratelimit. It's simply not a platform for that kind of stuff.
Consider:

  • Showing the user the response only when it's done, not repeatedly editing the message.
  • If using interactions, usingthe editReply() method on the interaction which uses the interaction webhook ...
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Summary

Small, documentation-only fixes across a few packages and the guide. No code behavior is changed.

Please describe the changes this PR makes and why it should be merged:

  • packages/brokers/src/brokers/redis/RedisGateway.ts — fix wetherwhether and dependantdependent in the RedisGateway class JSDoc.
  • apps/guide/content/docs/legacy/miscellaneous/useful-packages.mdx — remove duplicated word: "Check the the documentation" → "Check the documentation".
  • ...
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Which package is this bug report for?

discord.js

Issue description

Hey, I'm trying to create a /ban command. I want the users to be able to appeal this ban with a /appeal command that they can execute in the bot's DM, but actually, the bot appears offline when they're banned.

So firtsly, I tried with the /ping command. When the users are on the guild, they can use the command in the bot's DM because it appears online. Then, when they're banned, the bot appears offline, so the user...

vocal rampartBOT
#

Hey, I don't understand, I added your code, and they can't. Can you help me ? I don't understand how to do.

data: new SlashCommandBuilder()
        .setName('ping')
        .setDescription('Affiche le ping et la latence du bot.')
        .setDefaultMemberPermissions(null)
        .setContexts([
            InteractionContextType.Guild, 
            InteractionContextType.BotDM, 
            InteractionContextType.PrivateChannel
        ])
        .setIntegrationTypes([Appli...
#

Yeah, I already saw that on few servers, but I didn't want to do that because I think that one server for the "main" server and a second server for the appeals, it can be a lot.
I'll see that later.
Thanks you for your help.
So, when I want a command to be accessible in DM, I need to set the contexts and the Integration Type ? Do I need to add the ApplicationIntegrationType.GuildInstall ?

#

Yeah, I already saw that on few servers, but I didn't want to do that because I think that one server for the "main" server and a second server for the appeals, it can be a lot.

Yes, indeed, I have several servers linked to the server that accepts appeals.

Do I need to add the ApplicationIntegrationType.GuildInstall ?

This can be left if contexts are set only to BOT_DM.
This way, if the user and the application share servers, the user won't need to install the application.

vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

Found a few typos in the guide documentation files:

  1. apps/guide/CONTRIBUTING.md

    • Line with "repeating formatting intsructions" → should be "instructions"
    • Line with "When descrbing multiple files" → should be "describing"
  2. apps/guide/README.md (minor wording improvement)

    • "check your changes out locally" → could be "check your changes locally" (remove redundant "out")

These are minor documentation fixes that improve readability. Happy to submit a PR ...

vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

When a bot sends a reply, the Discord client sometimes shows the typing indicator stopping and then restarting immediately after the message is sent.

This is visible in a thread context with a bot built on discord.js. Other bots in the same server do not show the same behavior.

Observed behavior:

  • typing indicator ends when the message is sent
  • then it reappears right after, without a new incoming message

Expected behavior:

  • typing should stop once the response is delivered
  • it should ...
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/choices-validation
vocal rampartBOT
vocal rampartBOT
#

Hello!

It's a problem for a while that DiscordJS based bot might just stop the working even process itslef is still running and not failed. This happens always when there are network failures and disconnects. Is any way to handle the possible disconnect and run the reconnect from the scratch? Or at least self-kill process and let things like SystemD to restart the process. Recently I had two such accidents, like district-wide power surge that caused network fail, my server continued to wor...

#

Is that a built-in dependency? However, it doesn't work as expected, especially if network failures are longer, like, for 5 or 10 minutes entire network was down (switches are working, but node in a middle is failed, and it's totally no network available). And it doesn't reconnects. And, it also sometimes gets failed after the long time work (the bot is installed as SystemD daemon and works 24/7).

#

When disconnected from the network for a long time, does your process crash and terminate, or does it freeze?
I had a similar issue where an unhandled error occurred and the process terminated after a long network outage.
I fixed it by adding two handlers: process.addListener('unhandledRejection', (err) => console.error(err)) and process.addListener('uncaughtException', (err) => console.error(err)).

vocal rampartBOT
#

Just a simple example of this simple bot: https://github.com/Wohlstand/bastionbot-js
And ye, I need to slightly upgrade it. However, the absolutely same happens with my more complicated bot https://github.com/Wohlstand/FoxyBot/, it works on DiscordJS 14, and the problem I described happens for a long while, since 2018, since 2020, since 2022, and recently it happens too. No matter, simple bot, or complicated. The result is same, they might just stop to do everything and print no errors. But ...

vocal rampartBOT
#
[discordjs/discord.js] New branch created: chore/bump-deps
vocal rampartBOT
vocal rampartBOT
vocal rampartBOT
#

If you can get us a reproduction sample / steps to reproduce, we can take a look. But discordjs/ws should always attempt to reconnect, no matter what

I forgot to mention, I ran all my bots with the --max-old-space-size=256 --expose-gc arguments of NodeJS, and the periodically ran function calls the garbage collector every half of hour. Is that possible the limited memory and garbage collector might cause such problem?

#

The test case - the BastionBot that I mentioned before, just now I upgraded it to the latest stable DiscordJS and the code to use new API.

You just fill the JSON config file with the static guild and dedicated text channel, and the token to connect, bot is just replying to any "dance" word mentioned in messages sent at the dedicated guild channel. I ran the bot for 24/7. And the case I mentioned before, just let entire network to go off for a l...

#

Uhm. Aside of the fact you really shouldn't be limiting your processes to such small amounts of ram (and according to your github for bastionbot, you actually cap it at 128MB of ram) nor touch the GC (it can handle itself), the logs don't really show anything suspicious.

You should listen to debug events on your client and print those, and catch this error you're seeing (client.on('debug', message => {}) but you might want to filter out heartbeat messages), and ideally follow up with tho...

#

I do such memory limiting knowing NodeJS is a greedy memory eater, and I don't want simple bots eat so much memory of the server (I would like to rebuild entire set of bots just into C++, but available SDKs for Discord aren't well developed).

You should listen to debug events on your client and print those, and catch this error you're seeing (client.on('debug', message => {}) but you might want to filter out heartbeat messages), and ideally follow up with those here when you reproduce th...

vocal rampartBOT
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/sim-resolve-scheduled-event
vocal rampartBOT
#
[discordjs/discord.js] New branch created: fix/sharding-manager-api-url
vocal rampartBOT
#

Good news first, @Trembler34: we're past the scope problem. The new log line is openid-client's iss validation step, and the expected undefined part is the actual clue.

What's happening

When the OIDC config in ProxCenter has the manual override URLs filled in (Authorization URL, Token URL, Userinfo URL), our backend skips OIDC discovery and constructs the provider from those URLs directly. The issuer metadata never gets loaded, so NextAuth's id_token validator has nothing to compare t...

vocal rampartBOT
vocal rampartBOT