Skip to content

Commit

Permalink
fix(MessagePayload): crash when resolving body (#10454)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
N1ckPro and kodiakhq[bot] authored Aug 20, 2024
1 parent b0f8df0 commit dd795da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/src/structures/MessagePayload.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class MessagePayload {
// If `nonce` isn't provided, generate one & set `enforceNonce`
// Unless `enforceNonce` is explicitly set to `false`(not just falsy)
if (nonce === undefined) {
if (this.options.enforceNonce !== false && this.client.options.enforceNonce) {
if (this.options.enforceNonce !== false && this.target.client.options.enforceNonce) {
nonce = DiscordSnowflake.generate().toString();
enforce_nonce = true;
} else if (enforce_nonce) {
Expand Down

0 comments on commit dd795da

Please sign in to comment.