Skip to content

Commit

Permalink
fix(MessagePayload): crash when resolving body
Browse files Browse the repository at this point in the history
  • Loading branch information
N1ckPro committed Aug 20, 2024
1 parent bf83db9 commit fe9b69a
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 fe9b69a

Please sign in to comment.