aboutsummaryrefslogtreecommitdiff
path: root/src/listeners/track-manual-punishments
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-14 12:47:57 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-14 12:47:57 -0400
commit661e4c9935aeb8760dafc7ced4bbec6cc356a033 (patch)
treebb4c12bdef067d203f100e13e05ccb705b299834 /src/listeners/track-manual-punishments
parenteaf592b72eb5b1d66aa2bde5151a8947570a506c (diff)
downloadtanzanite-661e4c9935aeb8760dafc7ced4bbec6cc356a033.tar.gz
tanzanite-661e4c9935aeb8760dafc7ced4bbec6cc356a033.tar.bz2
tanzanite-661e4c9935aeb8760dafc7ced4bbec6cc356a033.zip
remove the war crimes that I previously committed
- Remove custom typings and replace with declaration merging - Fix the typings for args - Replace all discord-api-types imports with discord.js imports - Fix discord.js breaking changes
Diffstat (limited to 'src/listeners/track-manual-punishments')
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncBan.ts8
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncKick.ts7
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncTimeout.ts7
-rw-r--r--src/listeners/track-manual-punishments/modlogSyncUnban.ts8
4 files changed, 12 insertions, 18 deletions
diff --git a/src/listeners/track-manual-punishments/modlogSyncBan.ts b/src/listeners/track-manual-punishments/modlogSyncBan.ts
index 504992f..be937b9 100644
--- a/src/listeners/track-manual-punishments/modlogSyncBan.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncBan.ts
@@ -1,7 +1,5 @@
-import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
-import { EmbedBuilder } from '@discordjs/builders';
-import { AuditLogEvent } from 'discord-api-types/v10';
-import { PermissionFlagsBits } from 'discord.js';
+import { BushListener, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
+import { AuditLogEvent, EmbedBuilder, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncBanListener extends BushListener {
public constructor() {
@@ -43,7 +41,7 @@ export default class ModlogSyncBanListener extends BushListener {
const { log } = await Moderation.createModLogEntry({
type: ModLogType.PERM_BAN,
user: ban.user,
- moderator: <BushUser>first.executor,
+ moderator: first.executor,
reason: `[Manual] ${first.reason ? first.reason : 'No reason given'}`,
guild: ban.guild
});
diff --git a/src/listeners/track-manual-punishments/modlogSyncKick.ts b/src/listeners/track-manual-punishments/modlogSyncKick.ts
index 7a2c154..d136780 100644
--- a/src/listeners/track-manual-punishments/modlogSyncKick.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncKick.ts
@@ -1,6 +1,5 @@
-import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
-import { AuditLogEvent } from 'discord-api-types/v10';
-import { EmbedBuilder, PermissionFlagsBits } from 'discord.js';
+import { BushListener, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
+import { AuditLogEvent, EmbedBuilder, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncKickListener extends BushListener {
public constructor() {
@@ -42,7 +41,7 @@ export default class ModlogSyncKickListener extends BushListener {
const { log } = await Moderation.createModLogEntry({
type: ModLogType.KICK,
user: member.user,
- moderator: <BushUser>first.executor,
+ moderator: first.executor,
reason: `[Manual] ${first.reason ? first.reason : 'No reason given'}`,
guild: member.guild
});
diff --git a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
index f6235a9..adcd7fe 100644
--- a/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncTimeout.ts
@@ -1,6 +1,5 @@
-import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
-import { AuditLogEvent } from 'discord-api-types/v10';
-import { EmbedBuilder, PermissionFlagsBits } from 'discord.js';
+import { BushListener, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
+import { AuditLogEvent, EmbedBuilder, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncTimeoutListener extends BushListener {
public constructor() {
@@ -46,7 +45,7 @@ export default class ModlogSyncTimeoutListener extends BushListener {
const { log } = await Moderation.createModLogEntry({
type: newTime ? ModLogType.TIMEOUT : ModLogType.REMOVE_TIMEOUT,
user: newMember.user,
- moderator: <BushUser>first.executor,
+ moderator: first.executor,
reason: `[Manual] ${first.reason ? first.reason : 'No reason given'}`,
guild: newMember.guild,
duration: newTime ? newTime.getTime() - now.getTime() : undefined
diff --git a/src/listeners/track-manual-punishments/modlogSyncUnban.ts b/src/listeners/track-manual-punishments/modlogSyncUnban.ts
index cdf18d9..af0b21f 100644
--- a/src/listeners/track-manual-punishments/modlogSyncUnban.ts
+++ b/src/listeners/track-manual-punishments/modlogSyncUnban.ts
@@ -1,7 +1,5 @@
-import { BushListener, BushUser, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
-import { EmbedBuilder } from '@discordjs/builders';
-import { AuditLogEvent } from 'discord-api-types/v10';
-import { PermissionFlagsBits } from 'discord.js';
+import { BushListener, Moderation, ModLogType, Time, type BushClientEvents } from '#lib';
+import { AuditLogEvent, EmbedBuilder, PermissionFlagsBits } from 'discord.js';
export default class ModlogSyncUnbanListener extends BushListener {
public constructor() {
@@ -42,7 +40,7 @@ export default class ModlogSyncUnbanListener extends BushListener {
const { log } = await Moderation.createModLogEntry({
type: ModLogType.UNBAN,
user: ban.user,
- moderator: <BushUser>first.executor,
+ moderator: first.executor,
reason: `[Manual] ${first.reason ? first.reason : 'No reason given'}`,
guild: ban.guild
});