From 269bd70070eafaa27c4e7cf264ae181af59e34fc Mon Sep 17 00:00:00 2001 From: nolan Date: Tue, 15 Jun 2021 23:54:51 -0700 Subject: [PATCH] yeah lets get rid of response.response --- structure/moderation/ModerationManager.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/structure/moderation/ModerationManager.js b/structure/moderation/ModerationManager.js index ceed172..c7bcdcc 100644 --- a/structure/moderation/ModerationManager.js +++ b/structure/moderation/ModerationManager.js @@ -80,7 +80,6 @@ class ModerationManager { const silent = Boolean(message.guild._settings.silent || message.arguments.silent); const force = message.arguments?.force?.value || false; - const original = null; const responses = []; for (const target of targets) { const response = await this._handleTarget(Infraction, target, { @@ -199,10 +198,7 @@ class ModerationManager { let verification = infraction.verify(info.executor, target, info.channel); if(verification instanceof Promise) verification = await verification; - if(verification.error) return { - error: true, - response: verification - }; + if(verification.error) return verification; if(infraction.targetType === 'USER') { const userTarget = target instanceof User ? target : target.user; @@ -280,7 +276,7 @@ class ModerationManager { } } - if(response.error) return response.response; + if(response.error) return response; response.infraction.totalPoints = await response.infraction.target.totalPoints(guild, { points, expiration, timestamp: response.infraction.timestamp }); return response.infraction.execute();