From 26f9420f67ab65781a1ec7b0e94ae9d101cd9288 Mon Sep 17 00:00:00 2001 From: Vermium Sifell Date: Sun, 16 Oct 2022 15:26:58 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Fixed=20som?= =?UTF-8?q?e=20more=20code=20smells?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/modules/roles/components/overDueForPayment.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/jobs/shop/modules/roles/components/overDueForPayment.ts b/src/jobs/shop/modules/roles/components/overDueForPayment.ts index 3a834d8..c3cdfd3 100644 --- a/src/jobs/shop/modules/roles/components/overDueForPayment.ts +++ b/src/jobs/shop/modules/roles/components/overDueForPayment.ts @@ -39,16 +39,13 @@ export const execute = async (client: Client, role: IShopRole) => { roleId, guildId, }) - .then(async () => { + .then(() => { logger.silly( `Shop role document ${roleId} has been deleted from user ${userId}.` ); }) - .catch(async (err) => { - throw new Error( - `Error deleting shop role document ${roleId} from user ${userId}.`, - err - ); + .catch(() => { + throw new Error("Failed deleting shop role from user."); }); }) .catch(() => {