From a0775f0b31f7a7ab6c33228b67dfbbd032287e43 Mon Sep 17 00:00:00 2001 From: Yuzu Date: Fri, 24 Jun 2022 21:35:27 -0500 Subject: [PATCH 1/2] feat: Role.delete() --- structures/Role.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/structures/Role.ts b/structures/Role.ts index fd754f7..ac5bb85 100644 --- a/structures/Role.ts +++ b/structures/Role.ts @@ -42,14 +42,9 @@ export class Role implements Model { return `#${this.color.toString(16).padStart(6, '0')}`; } - /* - * delete() { - * return.this.guild.deleteRole(this.id); - * } - * edit() { - * return this.guild.editRole(this.id); - * } - * */ + async delete() { + await this.guild.deleteRole(this.id); + } toString() { switch (this.id) { From 330a83c83a7dc950077c24cd75c23df04ba7b8d5 Mon Sep 17 00:00:00 2001 From: Yuzu Date: Sat, 25 Jun 2022 02:20:21 -0500 Subject: [PATCH 2/2] fix: supress embeds --- mod.ts | 9 +++++++++ structures/Message.ts | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mod.ts b/mod.ts index f869556..9336da3 100644 --- a/mod.ts +++ b/mod.ts @@ -1,3 +1,12 @@ export * from "./session/mod.ts"; export * from "./util/mod.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"; diff --git a/structures/Message.ts b/structures/Message.ts index 9bff529..5d4de74 100644 --- a/structures/Message.ts +++ b/structures/Message.ts @@ -103,11 +103,11 @@ export class Message implements Model { async suppressEmbeds(suppress: true): Promise; async suppressEmbeds(suppress: false): Promise; async suppressEmbeds(suppress = true) { - if (this.flags === MessageFlags.SUPPRESS_EMBEDS && suppress === false) { + if (this.flags === MessageFlags.SupressEmbeds && suppress === false) { return; } - const message = await this.edit({ flags: MessageFlags.SUPPRESS_EMBEDS }); + const message = await this.edit({ flags: MessageFlags.SupressEmbeds }); return message; }