fix: supress embeds

This commit is contained in:
Yuzu 2022-06-25 02:20:21 -05:00
parent a0775f0b31
commit 330a83c83a
2 changed files with 11 additions and 2 deletions

9
mod.ts
View File

@ -1,3 +1,12 @@
export * from "./session/mod.ts"; export * from "./session/mod.ts";
export * from "./util/mod.ts"; export * from "./util/mod.ts";
export * from "./vendor/external.ts"; export * from "./vendor/external.ts";
export * from "./structures/User.ts";
export * from "./structures/Role.ts";
export * from "./structures/Base.ts";
export * from "./structures/Guild.ts";
export * from "./structures/Member.ts";
export * from "./structures/Message.ts";
export * from "./structures/BaseGuild.ts";
export * from "./structures/Attachment.ts";
export * from "./structures/AnonymousGuild.ts";

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;
} }