Command registration (for mini)
diff --git a/src/events/channelCreate.ts b/src/events/channelCreate.ts
index f3a4785..b3cba33 100644
--- a/src/events/channelCreate.ts
+++ b/src/events/channelCreate.ts
@@ -1,6 +1,6 @@
import type { GuildAuditLogsEntry } from "discord.js";
import type { GuildBasedChannel } from "discord.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "channelCreate";
export async function callback(client: NucleusClient, channel: GuildBasedChannel) {
diff --git a/src/events/channelDelete.ts b/src/events/channelDelete.ts
index d92c994..2c48b02 100644
--- a/src/events/channelDelete.ts
+++ b/src/events/channelDelete.ts
@@ -6,12 +6,12 @@
ThreadChannel,
VoiceChannel
} from "discord.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import getEmojiByName from "../utils/getEmojiByName.js";
export const event = "channelDelete";
-export async function callback(client: HaikuClient, channel: GuildBasedChannel) {
+export async function callback(client: NucleusClient, channel: GuildBasedChannel) {
const { getAuditLog, log, NucleusColors, entry, renderDelta, renderUser } = client.logger;
const auditLog = await getAuditLog(channel.guild, "CHANNEL_DELETE");
diff --git a/src/events/guildBanAdd.ts b/src/events/guildBanAdd.ts
index d1649a3..5fd0b49 100644
--- a/src/events/guildBanAdd.ts
+++ b/src/events/guildBanAdd.ts
@@ -1,11 +1,11 @@
import type { GuildAuditLogsEntry, GuildBan } from "discord.js";
import { purgeByUser } from "../actions/tickets/delete.js";
import { callback as statsChannelRemove } from "../reflex/statsChannelUpdate.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "guildBanAdd";
-export async function callback(client: HaikuClient, ban: GuildBan) {
+export async function callback(client: NucleusClient, ban: GuildBan) {
await statsChannelRemove(client, undefined, ban.guild, ban.user);
purgeByUser(ban.user.id, ban.guild);
const { log, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = client.logger;
diff --git a/src/events/guildBanRemove.ts b/src/events/guildBanRemove.ts
index 2c3fc7b..f9b427a 100644
--- a/src/events/guildBanRemove.ts
+++ b/src/events/guildBanRemove.ts
@@ -1,10 +1,10 @@
import type { GuildAuditLogsEntry, GuildBan } from "discord.js";
import { purgeByUser } from "../actions/tickets/delete.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "guildBanRemove";
-export async function callback(client: HaikuClient, ban: GuildBan) {
+export async function callback(client: NucleusClient, ban: GuildBan) {
purgeByUser(ban.user.id, ban.guild);
const { log, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = client.logger;
const auditLog = await getAuditLog(ban.guild, "MEMBER_BAN_REMOVE");
diff --git a/src/events/guildCreate.ts b/src/events/guildCreate.ts
index b1adbaa..ff6c6b2 100644
--- a/src/events/guildCreate.ts
+++ b/src/events/guildCreate.ts
@@ -1,9 +1,9 @@
import type { Guild } from "discord.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import guide from "../reflex/guide.js";
export const event = "guildCreate";
-export async function callback(_client: HaikuClient, guild: Guild) {
+export async function callback(_client: NucleusClient, guild: Guild) {
guide(guild);
}
diff --git a/src/events/guildMemberUpdate.ts b/src/events/guildMemberUpdate.ts
index 543d6ff..0ebfc3d 100644
--- a/src/events/guildMemberUpdate.ts
+++ b/src/events/guildMemberUpdate.ts
@@ -1,9 +1,9 @@
import type { GuildAuditLogsEntry, GuildMember } from "discord.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "guildMemberUpdate";
-export async function callback(client: HaikuClient, before: GuildMember, after: GuildMember) {
+export async function callback(client: NucleusClient, before: GuildMember, after: GuildMember) {
try {
const { log, NucleusColors, entry, renderUser, renderDelta, getAuditLog } = client.logger;
const auditLog = await getAuditLog(after.guild, "MEMBER_UPDATE");
diff --git a/src/events/guildUpdate.ts b/src/events/guildUpdate.ts
index 703b2d9..e463007 100644
--- a/src/events/guildUpdate.ts
+++ b/src/events/guildUpdate.ts
@@ -1,10 +1,10 @@
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import type { Guild, GuildAuditLogsEntry } from "discord.js";
import { callback as statsChannelUpdate } from "../reflex/statsChannelUpdate.js";
export const event = "guildUpdate";
-export async function callback(client: HaikuClient, before: Guild, after: Guild) {
+export async function callback(client: NucleusClient, before: Guild, after: Guild) {
await statsChannelUpdate(client, after.me!);
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
const auditLog = await getAuditLog(after, "GUILD_UPDATE");
diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts
index 4feee82..ddc143b 100644
--- a/src/events/interactionCreate.ts
+++ b/src/events/interactionCreate.ts
@@ -6,7 +6,7 @@
import Fuse from "fuse.js";
import { autocomplete as tagAutocomplete } from "../commands/tag.js";
import type { AutocompleteInteraction, Interaction, MessageComponentInteraction } from "discord.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "interactionCreate";
@@ -102,6 +102,6 @@
}
}
-export async function callback(_client: HaikuClient, interaction: Interaction) {
+export async function callback(_client: NucleusClient, interaction: Interaction) {
await interactionCreate(interaction);
}
diff --git a/src/events/inviteCreate.ts b/src/events/inviteCreate.ts
index 76dfc1e..7dbf8a7 100644
--- a/src/events/inviteCreate.ts
+++ b/src/events/inviteCreate.ts
@@ -1,11 +1,11 @@
import type { GuildAuditLogsEntry, Invite } from "discord.js";
// @ts-expect-error
import humanizeDuration from "humanize-duration";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "inviteCreate";
-export async function callback(client: HaikuClient, invite: Invite) {
+export async function callback(client: NucleusClient, invite: Invite) {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
const auditLog = await getAuditLog(invite.guild, "INVITE_CREATE");
const audit = auditLog.entries
diff --git a/src/events/inviteDelete.ts b/src/events/inviteDelete.ts
index cdc6828..e74ad15 100644
--- a/src/events/inviteDelete.ts
+++ b/src/events/inviteDelete.ts
@@ -1,11 +1,11 @@
import type { GuildAuditLogsEntry, Invite } from "discord.js";
// @ts-expect-error
import humanizeDuration from "humanize-duration";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "inviteDelete";
-export async function callback(client: HaikuClient, invite: Invite) {
+export async function callback(client: NucleusClient, invite: Invite) {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
const auditLog = await getAuditLog(invite.guild, "INVITE_DELETE");
const audit = auditLog.entries
diff --git a/src/events/memberJoin.ts b/src/events/memberJoin.ts
index 95dfde2..93c9186 100644
--- a/src/events/memberJoin.ts
+++ b/src/events/memberJoin.ts
@@ -1,11 +1,11 @@
import type { GuildMember } from "discord.js";
import { callback as statsChannelAdd } from "../reflex/statsChannelUpdate.js";
import { callback as welcome } from "../reflex/welcome.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "guildMemberAdd";
-export async function callback(client: HaikuClient, member: GuildMember) {
+export async function callback(client: NucleusClient, member: GuildMember) {
welcome(client, member);
statsChannelAdd(client, member);
const { log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
diff --git a/src/events/memberLeave.ts b/src/events/memberLeave.ts
index 8fa0c76..4731d58 100644
--- a/src/events/memberLeave.ts
+++ b/src/events/memberLeave.ts
@@ -1,12 +1,12 @@
import type { GuildAuditLogsEntry, GuildMember } from "discord.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import { purgeByUser } from "../actions/tickets/delete.js";
import { callback as statsChannelRemove } from "../reflex/statsChannelUpdate.js";
export const event = "guildMemberRemove";
-export async function callback(client: HaikuClient, member: GuildMember) {
+export async function callback(client: NucleusClient, member: GuildMember) {
purgeByUser(member.id, member.guild);
await statsChannelRemove(client, member);
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts
index 76b6855..3f85de6 100644
--- a/src/events/messageCreate.ts
+++ b/src/events/messageCreate.ts
@@ -1,4 +1,4 @@
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import { LinkCheck, MalwareCheck, NSFWCheck, SizeCheck, TestString, TestImage } from "../reflex/scanners.js";
import logAttachment from "../premium/attachmentLogs.js";
import createLogException from "../utils/createLogException.js";
@@ -9,7 +9,7 @@
export const event = "messageCreate";
-export async function callback(_client: HaikuClient, message: Message) {
+export async function callback(_client: NucleusClient, message: Message) {
if (!message.guild) return;
if (message.author.bot) return;
if (message.channel.type === "DM") return;
diff --git a/src/events/messageDelete.ts b/src/events/messageDelete.ts
index bc668f1..ddeff96 100644
--- a/src/events/messageDelete.ts
+++ b/src/events/messageDelete.ts
@@ -1,9 +1,9 @@
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import type { GuildAuditLogsEntry, Message } from "discord.js";
export const event = "messageDelete";
-export async function callback(client: HaikuClient, message: Message) {
+export async function callback(client: NucleusClient, message: Message) {
try {
if (message.author.id === client.user.id) return;
if (client.noLog.includes(`${message.id}/${message.channel.id}/${message.id}`)) return;
diff --git a/src/events/messageEdit.ts b/src/events/messageEdit.ts
index 4c482cc..37178a7 100644
--- a/src/events/messageEdit.ts
+++ b/src/events/messageEdit.ts
@@ -1,9 +1,9 @@
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import type { Message, MessageReference } from "discord.js";
export const event = "messageUpdate";
-export async function callback(client: HaikuClient, oldMessage: Message, newMessage: Message) {
+export async function callback(client: NucleusClient, oldMessage: Message, newMessage: Message) {
if (newMessage.author.id === client.user.id) return;
if (!newMessage.guild) return;
const { log, NucleusColors, entry, renderUser, renderDelta, renderNumberDelta, renderChannel } = client.logger;
diff --git a/src/events/roleCreate.ts b/src/events/roleCreate.ts
index c8a32b1..25e9c98 100644
--- a/src/events/roleCreate.ts
+++ b/src/events/roleCreate.ts
@@ -1,9 +1,9 @@
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import type { GuildAuditLogsEntry, Role } from "discord.js";
export const event = "roleCreate";
-export async function callback(client: HaikuClient, role: Role) {
+export async function callback(client: NucleusClient, role: Role) {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderRole } = client.logger;
if (role.managed) return;
const auditLog = await getAuditLog(role.guild, "ROLE_CREATE");
diff --git a/src/events/roleDelete.ts b/src/events/roleDelete.ts
index 1f71f25..4c89565 100644
--- a/src/events/roleDelete.ts
+++ b/src/events/roleDelete.ts
@@ -1,10 +1,10 @@
import getEmojiByName from "../utils/getEmojiByName.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import type { GuildAuditLogsEntry, Role } from "discord.js";
export const event = "roleDelete";
-export async function callback(client: HaikuClient, role: Role) {
+export async function callback(client: NucleusClient, role: Role) {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
if (role.managed) return;
const auditLog = await getAuditLog(role.guild, "ROLE_DELETE");
diff --git a/src/events/roleUpdate.ts b/src/events/roleUpdate.ts
index 357a22f..fc26d6c 100644
--- a/src/events/roleUpdate.ts
+++ b/src/events/roleUpdate.ts
@@ -1,10 +1,10 @@
import type { Role } from "discord.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import getEmojiByName from "../utils/getEmojiByName.js";
export const event = "roleUpdate";
-export async function callback(client: HaikuClient, or: Role, nr: Role) {
+export async function callback(client: NucleusClient, or: Role, nr: Role) {
const { getAuditLog, log, NucleusColors, entry, renderDelta, renderUser, renderRole } = client.logger;
const auditLog = await getAuditLog(nr.guild, "ROLE_UPDATE");
diff --git a/src/events/stickerCreate.ts b/src/events/stickerCreate.ts
index b7a417c..295d48b 100644
--- a/src/events/stickerCreate.ts
+++ b/src/events/stickerCreate.ts
@@ -1,9 +1,9 @@
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import type { GuildAuditLogsEntry, Sticker } from "discord.js";
export const event = "stickerDelete";
-export async function callback(client: HaikuClient, emoji: Sticker) {
+export async function callback(client: NucleusClient, emoji: Sticker) {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
const auditLog = await getAuditLog(emoji.guild, "STICKER_CREATE");
const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === emoji.id).first();
diff --git a/src/events/stickerDelete.ts b/src/events/stickerDelete.ts
index 8130d8a..fed99e6 100644
--- a/src/events/stickerDelete.ts
+++ b/src/events/stickerDelete.ts
@@ -1,9 +1,9 @@
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import type { GuildAuditLogsEntry, Sticker } from "discord.js";
export const event = "stickerDelete";
-export async function callback(client: HaikuClient, emoji: Sticker) {
+export async function callback(client: NucleusClient, emoji: Sticker) {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
const auditLog = await getAuditLog(emoji.guild, "STICKER_DELETE");
const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === emoji.id).first();
diff --git a/src/events/stickerUpdate.ts b/src/events/stickerUpdate.ts
index 1421ec2..0ac000e 100644
--- a/src/events/stickerUpdate.ts
+++ b/src/events/stickerUpdate.ts
@@ -1,9 +1,9 @@
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
import type { Sticker } from "discord.js";
export const event = "stickerUpdate";
-export async function callback(client: HaikuClient, oe: Sticker, ne: Sticker) {
+export async function callback(client: NucleusClient, oe: Sticker, ne: Sticker) {
const { getAuditLog, log, NucleusColors, entry, renderDelta, renderUser } = client.logger;
if (oe.name === ne.name) return;
diff --git a/src/events/threadCreate.ts b/src/events/threadCreate.ts
index f0f32e5..1f1b758 100644
--- a/src/events/threadCreate.ts
+++ b/src/events/threadCreate.ts
@@ -1,10 +1,10 @@
import type { GuildAuditLogsEntry, ThreadChannel } from "discord.js";
// @ts-expect-error
import humanizeDuration from "humanize-duration";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "threadCreate";
-export async function callback(client: HaikuClient, thread: ThreadChannel) {
+export async function callback(client: NucleusClient, thread: ThreadChannel) {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
const auditLog = await getAuditLog(thread.guild, "THREAD_CREATE");
const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === thread.id).first();
diff --git a/src/events/threadDelete.ts b/src/events/threadDelete.ts
index c166f86..cdc89ee 100644
--- a/src/events/threadDelete.ts
+++ b/src/events/threadDelete.ts
@@ -1,10 +1,10 @@
import type { GuildAuditLogsEntry, ThreadChannel } from "discord.js";
// @ts-expect-error
import humanizeDuration from "humanize-duration";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "threadDelete";
-export async function callback(client: HaikuClient, thread: ThreadChannel) {
+export async function callback(client: NucleusClient, thread: ThreadChannel) {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
const auditLog = await getAuditLog(thread.guild, "THREAD_UPDATE");
const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === thread.id).first();
diff --git a/src/events/threadUpdate.ts b/src/events/threadUpdate.ts
index 20247d6..9125fcb 100644
--- a/src/events/threadUpdate.ts
+++ b/src/events/threadUpdate.ts
@@ -1,11 +1,11 @@
import type { GuildAuditLogsEntry, ThreadChannel } from "discord.js";
// @ts-expect-error
import humanizeDuration from "humanize-duration";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "threadUpdate";
-export async function callback(client: HaikuClient, before: ThreadChannel, after: ThreadChannel) {
+export async function callback(client: NucleusClient, before: ThreadChannel, after: ThreadChannel) {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
const auditLog = await getAuditLog(after.guild, "THREAD_UPDATE");
const audit = auditLog.entries.filter((entry: GuildAuditLogsEntry) => entry.target!.id === after.id).first();
diff --git a/src/events/webhookUpdate.ts b/src/events/webhookUpdate.ts
index e4e9659..a991c66 100644
--- a/src/events/webhookUpdate.ts
+++ b/src/events/webhookUpdate.ts
@@ -1,9 +1,9 @@
import type { GuildAuditLogsEntry, Webhook } from "discord.js";
import type Discord from "discord.js";
-import type { HaikuClient } from "../utils/haiku/index.js";
+import type { NucleusClient } from "../utils/client.js";
export const event = "webhookUpdate";
-export async function callback(client: HaikuClient, channel: Discord.GuildChannel) {
+export async function callback(client: NucleusClient, channel: Discord.GuildChannel) {
try {
const { getAuditLog, log, NucleusColors, entry, renderUser, renderChannel, renderDelta } = client.logger;
let auditLogCreate = getAuditLog(channel.guild, "WEBHOOK_CREATE");