From 6c9710cb76347b79a2463ec0ca5bde59177b531f Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 14 Mar 2022 20:44:16 -0400 Subject: feat(logging): over complicated repl --- src/lib/common/AutoMod.ts | 6 +++--- src/lib/common/HighlightManager.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/common') diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts index db3e709..1aa6266 100644 --- a/src/lib/common/AutoMod.ts +++ b/src/lib/common/AutoMod.ts @@ -200,7 +200,7 @@ export class AutoMod { } }, (err: any, response: any) => { - if (err) return console.log(err?.message); + if (err) return client.console.stdout(err?.message); const normalize = (val: number, min: number, max: number) => (val - min) / (max - min); @@ -214,10 +214,10 @@ export class AutoMod { } }; - console.log(chalk.cyan(this.message.content)); + client.console.stdout(chalk.cyan(this.message.content)); Object.entries(response.data.attributeScores) .sort(([a], [b]) => a.localeCompare(b)) - .forEach(([key, value]: any[]) => console.log(chalk.white(key), color(value.summaryScore.value))); + .forEach(([key, value]: any[]) => client.console.raw(chalk.white(key), color(value.summaryScore.value))); } ); } diff --git a/src/lib/common/HighlightManager.ts b/src/lib/common/HighlightManager.ts index a8bacee..4347c27 100644 --- a/src/lib/common/HighlightManager.ts +++ b/src/lib/common/HighlightManager.ts @@ -214,7 +214,7 @@ export class HighlightManager { if (this.lastedDMedUserCooldown.has(user)) { const lastDM = this.lastedDMedUserCooldown.get(user)!; if (new Date().getTime() - lastDM.getTime() < 5 * Time.Minute) { - console.log(`User ${user} has been dmed recently.`); + void client.console.verbose('Highlight', `User <<${user}>> has been dmed recently.`); return false; } } -- cgit