From b9b2994af9ded85a93ac3d737178eac2fd8c5264 Mon Sep 17 00:00:00 2001 From: Vermium Sifell Date: Tue, 13 Dec 2022 14:16:41 +0100 Subject: [PATCH] refactor: :coffin: Fixed some code smells Fixed some code smells from https://deepsource.io/gh/ZynerOrg/xyter/run/8058c521-9330-4c14-94b2-0c3a7d9d824b/javascript/ --- src/commands/reputation/modules/check/index.ts | 6 +++--- src/commands/utils/modules/about/index.ts | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/commands/reputation/modules/check/index.ts b/src/commands/reputation/modules/check/index.ts index fc80d53..1e6008f 100644 --- a/src/commands/reputation/modules/check/index.ts +++ b/src/commands/reputation/modules/check/index.ts @@ -72,7 +72,7 @@ export default { logger.silly(createGuildMember); - const reputationType = async (reputation: number) => { + const reputationType = (reputation: number) => { if (reputation < 0) return `negative reputation of ${reputation}`; if (reputation > 0) return `positive reputation of ${reputation}`; return "neutral reputation"; @@ -86,10 +86,10 @@ export default { ) .setDescription( optionAccount - ? `${optionAccount} have a ${await reputationType( + ? `${optionAccount} have a ${reputationType( createGuildMember.user.reputationsEarned )}` - : `You have a ${await reputationType( + : `You have a ${reputationType( createGuildMember.user.reputationsEarned )}` ) diff --git a/src/commands/utils/modules/about/index.ts b/src/commands/utils/modules/about/index.ts index dc71f10..4412df5 100644 --- a/src/commands/utils/modules/about/index.ts +++ b/src/commands/utils/modules/about/index.ts @@ -46,8 +46,6 @@ export default { const minutes = Math?.floor(totalSeconds / 60); const seconds = Math?.floor(totalSeconds % 60); - const uptime = `${days} days, ${hours} hours, ${minutes} minutes and ${seconds} seconds`; - // // Initialize a storage for the user ids // const userIds = new Set(); // // Iterate over all guilds (always cached)