fix: supress embeds

This commit is contained in:
socram03 2022-06-23 20:39:18 -04:00
parent 998fd7cb73
commit 0f68995136

View File

@ -103,11 +103,11 @@ export class Message implements Model {
async suppressEmbeds(suppress: true): Promise<Message>; async suppressEmbeds(suppress: true): Promise<Message>;
async suppressEmbeds(suppress: false): Promise<Message | undefined>; async suppressEmbeds(suppress: false): Promise<Message | undefined>;
async suppressEmbeds(suppress = true) { async suppressEmbeds(suppress = true) {
if (this.flags === MessageFlags.SUPPRESS_EMBEDS && suppress === false) { if (this.flags === MessageFlags.SupressEmbeds && suppress === false) {
return; return;
} }
const message = await this.edit({ flags: MessageFlags.SUPPRESS_EMBEDS }); const message = await this.edit({ flags: MessageFlags.SupressEmbeds });
return message; return message;
} }