aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/track-manual-punishments
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-03-14 20:44:16 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-03-14 20:44:16 -0400
commit6c9710cb76347b79a2463ec0ca5bde59177b531f (patch)
treef6b00aa2af9b84ca2e99c3699145fe5475a27cf9 /src/listeners/track-manual-punishments
parent59a4eb09916ad7c9e6cd8ea8b4d3a72189c284ce (diff)
downloadtanzanite-6c9710cb76347b79a2463ec0ca5bde59177b531f.tar.gz
tanzanite-6c9710cb76347b79a2463ec0ca5bde59177b531f.tar.bz2
tanzanite-6c9710cb76347b79a2463ec0ca5bde59177b531f.zip
feat(logging): over complicated repl
Diffstat (limited to 'src/listeners/track-manual-punishments')
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncBan.ts5
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncKick.ts5
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncTimeout.ts5
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncUnban.ts5
4 files changed, 12 insertions, 8 deletions
diff --git a/src/listeners/track-manual-punishments/modlogSyncBan.ts b/src/listeners/track-manual-punishments/modlogSyncBan.ts
index 7d77a76..b1bdcee 100644
--- a/src/listeners/track-manual-punishments/modlogSyncBan.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncBan.ts
@@ -34,8 +34,9 @@ export default class ModlogSyncBanListener extends BushListener {
if (!first.executor || first.executor?.bot) return;
if (Math.abs(first.createdAt.getTime() - now.getTime()) > Time.Minute) {
- console.log(util.humanizeDuration(Math.abs(first.createdAt.getTime() - now.getTime())));
- throw new Error('Time is off by over a minute');
+ throw new Error(
+ `Time is off by over a minute: ${util.humanizeDuration(Math.abs(first.createdAt.getTime() - now.getTime()))}`
+ );
}
const { log } = await Moderation.createModLogEntry({
diff --git a/src/listeners/track-manual-punishments/modlogSyncKick.ts b/src/listeners/track-manual-punishments/modlogSyncKick.ts
index 7841686..59b43bc 100644
--- a/src/listeners/track-manual-punishments/modlogSyncKick.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncKick.ts
@@ -34,8 +34,9 @@ export default class ModlogSyncKickListener extends BushListener {
if (!first.executor || first.executor?.bot) return;
if (Math.abs(first.createdAt.getTime() - now.getTime()) > Time.Minute) {
- console.log(util.humanizeDuration(Math.abs(first.createdAt.getTime() - now.getTime())));
- throw new Error('Time is off by over a minute');
+ throw new Error(
+ `Time is off by over a minute: ${util.humanizeDuration(Math.abs(first.createdAt.getTime() - now.getTime()))}`
+ );
}
const { log } = await Moderation.createModLogEntry({
diff --git a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
index 8a2c486..8ad8b79 100644
--- a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
@@ -36,8 +36,9 @@ export default class ModlogSyncTimeoutListener extends BushListener {
if (!timeOut) return;
if (Math.abs(first.createdAt.getTime() - now.getTime()) > Time.Minute) {
- console.log(util.humanizeDuration(Math.abs(first.createdAt.getTime() - now.getTime())));
- throw new Error('Time is off by over a minute');
+ throw new Error(
+ `Time is off by over a minute: ${util.humanizeDuration(Math.abs(first.createdAt.getTime() - now.getTime()))}`
+ );
}
const newTime = <string | null>timeOut.new ? new Date(<string>timeOut.new) : null;
diff --git a/src/listeners/track-manual-punishments/modlogSyncUnban.ts b/src/listeners/track-manual-punishments/modlogSyncUnban.ts
index 70c7ba8..1c5de1d 100644
--- a/src/listeners/track-manual-punishments/modlogSyncUnban.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncUnban.ts
@@ -33,8 +33,9 @@ export default class ModlogSyncUnbanListener extends BushListener {
if (!first.executor || first.executor?.bot) return;
if (Math.abs(first.createdAt.getTime() - now.getTime()) > Time.Minute) {
- console.log(util.humanizeDuration(Math.abs(first.createdAt.getTime() - now.getTime())));
- throw new Error('Time is off by over a minute');
+ throw new Error(
+ `Time is off by over a minute: ${util.humanizeDuration(Math.abs(first.createdAt.getTime() - now.getTime()))}`
+ );
}
const { log } = await Moderation.createModLogEntry({