Skip to content

Commit

Permalink
include embeds length check (use not instead of explicit undefined)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Aug 6, 2021
1 parent c64a32b commit 93c5341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ class Client extends EventEmitter {
};
} else if(content.content !== undefined && typeof content.content !== "string") {
content.content = "" + content.content;
} else if(content.content === undefined && !content.embed && !content.embeds && !file && (content.stickerIDs === undefined || content.stickerIDs.length === 0)) {
} else if(content.content === undefined && !content.embed && (!content.embeds || content.embeds.length === 0) && !file && (!content.stickerIDs || content.stickerIDs.length === 0)) {
return Promise.reject(new Error("No content, file, stickers, or embeds"));
} else if(content.embed && !content.embeds) {
this.emit("warn", "[DEPRECATED] content.embed is deprecated. Use content.embeds instead");
Expand Down

0 comments on commit 93c5341

Please sign in to comment.