From 372718e567e060cead16dde5d6d190666b4dd575 Mon Sep 17 00:00:00 2001 From: TymanWasTaken Date: Sun, 16 May 2021 20:30:34 -0400 Subject: add colored logging and improved logging code, fix a few moderation command issues, add more logging, and make ban check run every 30s not 60s --- src/tasks.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/tasks.ts') diff --git a/src/tasks.ts b/src/tasks.ts index 69fe97a..d728636 100644 --- a/src/tasks.ts +++ b/src/tasks.ts @@ -1,3 +1,4 @@ +import chalk from 'chalk'; import { DiscordAPIError } from 'discord.js'; import { Op } from 'sequelize'; import { BotClient } from './lib/extensions/BotClient'; @@ -15,7 +16,9 @@ export const BanTask = async (client: BotClient): Promise => { ] } }); - client.util.devLog(`Queried bans, found ${rows.length} expired bans.`); + client.logger.verbose( + chalk.cyan(`Queried bans, found ${rows.length} expired bans.`) + ); for (const row of rows) { const guild = client.guilds.cache.get(row.guild); if (!guild) { @@ -33,6 +36,6 @@ export const BanTask = async (client: BotClient): Promise => { } else throw e; } await row.destroy(); - client.util.devLog('Unbanned user'); + client.logger.verbose(chalk.cyan('Unbanned user')); } }; -- cgit