Skip to content

Commit dd795da

Browse files
fix(MessagePayload): crash when resolving body (#10454)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent b0f8df0 commit dd795da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/discord.js/src/structures/MessagePayload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class MessagePayload {
139139
// If `nonce` isn't provided, generate one & set `enforceNonce`
140140
// Unless `enforceNonce` is explicitly set to `false`(not just falsy)
141141
if (nonce === undefined) {
142-
if (this.options.enforceNonce !== false && this.client.options.enforceNonce) {
142+
if (this.options.enforceNonce !== false && this.target.client.options.enforceNonce) {
143143
nonce = DiscordSnowflake.generate().toString();
144144
enforce_nonce = true;
145145
} else if (enforce_nonce) {

0 commit comments

Comments
 (0)