diff --git a/src/structure/client/ModerationManager.js b/src/structure/client/ModerationManager.js index 374efe0..440ad0a 100644 --- a/src/structure/client/ModerationManager.js +++ b/src/structure/client/ModerationManager.js @@ -124,6 +124,8 @@ class ModerationManager { }); } + console.log(responses); + const success = Boolean(responses.some((r) => !r.error)); const succeeded = responses.filter((r) => !r.error); const failed = responses.filter((r) => r.error); @@ -138,17 +140,15 @@ class ModerationManager { const fails = {}; for (const response of responses) { const { type, target } = response.infraction; - if (!response.error) { - if (!silent) { - if (successes[type]) { - successes[type].targets.push(target.tag || target.name); - } else { - successes[type] = { - targets: [target.tag || target.name], - infraction: response.infraction, - escalation: response.escalation - }; - } + if (!response.error && !silent) { + if (successes[type]) { + successes[type].targets.push(target.tag || target.name); + } else { + successes[type] = { + targets: [target.tag || target.name], + infraction: response.infraction, + escalation: response.escalation + }; } } else { if (fails[type]) { @@ -163,6 +163,7 @@ class ModerationManager { } } + console.log(successes); const succeededTargets = succeeded.map((s) => s.infraction.target); const actions = await this._handleArguments(invoker, succeededTargets, args); //eslint-disable-line no-unused-vars @@ -186,6 +187,7 @@ class ModerationManager { data.escalation ? string += str : string = `${str}\n${string}`; //eslint-disable-line } } + console.log(string); for (const [, data] of Object.entries(fails)) { const { dictionary, targetType } = data.infraction; diff --git a/src/structure/components/commands/moderation/Note.js b/src/structure/components/commands/moderation/Note.js index 39c6368..da1856f 100644 --- a/src/structure/components/commands/moderation/Note.js +++ b/src/structure/components/commands/moderation/Note.js @@ -26,7 +26,7 @@ class NoteCommand extends ModerationCommand { return this.client.moderationManager.handleInfraction(Note, interaction, { targets: users.value, args: { - silent: silent || { value: true }, + silent, ...args } });