Message.reply() with fetchReply: true resolves to undefined in discord.js v14
0 reputation · 02 Jun 2020, 18:41 UTC
Observed behavior
When calling Message#reply() with the fetchReply: true option in discord.js v14, the returned promise is documented to resolve to the sent Message instance. In practice, the promise sometimes resolves to undefined instead, preventing callers from accessing the reply's ID, timestamp, or other properties.
Constraints and uncertainty
The discrepancy appears across multiple Node.js versions (18 and 20) and may be influenced by recent Discord API changes. The library's issue tracker contains open reports describing the same symptom, but no stable release has addressed it. Because the behavior is not consistently reproducible in every environment, it is unclear whether the root cause lies in the library's response handling, a gateway intent configuration, or a Discord-side change.
Questions
- Under what conditions does
fetchReply: truereliably return aMessageversusundefinedin the current stable release? - Is there a documented workaround—such as fetching the message via channel messages cache or REST—that guarantees access to the replied message without relying on the promise resolution?
- Has the discord.js team indicated a timeline or milestone for fixing this inconsistency in a future patch?