aboutsummaryrefslogtreecommitdiff
path: root/src/tasks.ts
diff options
context:
space:
mode:
authorTymanWasTaken <tyman@tyman.tech>2021-05-16 20:30:34 -0400
committerTymanWasTaken <tyman@tyman.tech>2021-05-16 20:30:34 -0400
commit372718e567e060cead16dde5d6d190666b4dd575 (patch)
tree1fad29305b6277838833a7e8ae4381136212f301 /src/tasks.ts
parent1db014860c3cf6070bb29f75b6a8cf08070e5b9a (diff)
downloadtanzanite-372718e567e060cead16dde5d6d190666b4dd575.tar.gz
tanzanite-372718e567e060cead16dde5d6d190666b4dd575.tar.bz2
tanzanite-372718e567e060cead16dde5d6d190666b4dd575.zip
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
Diffstat (limited to 'src/tasks.ts')
-rw-r--r--src/tasks.ts7
1 files changed, 5 insertions, 2 deletions
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<void> => {
]
}
});
- 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<void> => {
} else throw e;
}
await row.destroy();
- client.util.devLog('Unbanned user');
+ client.logger.verbose(chalk.cyan('Unbanned user'));
}
};