updated packages. fixed pnpm lock stuff.
Co-authored-by: PineappleFan <pineapplefanyt@gmail.com>
Co-authored-by: Skyler <skyler3665@gmail.com>
diff --git a/src/commands/mod/_meta.ts b/src/commands/mod/_meta.ts
index af8006c..a9dfdb0 100644
--- a/src/commands/mod/_meta.ts
+++ b/src/commands/mod/_meta.ts
@@ -3,6 +3,6 @@
const name = "mod";
const description = "Perform moderator actions";
-const subcommand = await command(name, description, `mod`);
+const subcommand: Awaited<ReturnType<typeof command>> = await command(name, description, `mod`);
export { name, description, subcommand as command };
diff --git a/src/commands/nucleus/_meta.ts b/src/commands/nucleus/_meta.ts
index bd7fd14..a206dec 100644
--- a/src/commands/nucleus/_meta.ts
+++ b/src/commands/nucleus/_meta.ts
@@ -3,6 +3,15 @@
const name = "nucleus";
const description = "Commands relating to Nucleus itself";
-const subcommand = await command(name, description, `nucleus`, undefined, undefined, undefined, undefined, true);
+const subcommand: Awaited<ReturnType<typeof command>> = await command(
+ name,
+ description,
+ `nucleus`,
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ true
+);
export { name, description, subcommand as command };
diff --git a/src/commands/server/_meta.ts b/src/commands/server/_meta.ts
index 250951b..d96895f 100644
--- a/src/commands/server/_meta.ts
+++ b/src/commands/server/_meta.ts
@@ -3,6 +3,6 @@
const name = "server";
const description = "Commands for the server";
-const subcommand = await command(name, description, `server`);
+const subcommand: Awaited<ReturnType<typeof command>> = await command(name, description, `server`);
export { name, description, subcommand as command };
diff --git a/src/commands/settings/_meta.ts b/src/commands/settings/_meta.ts
index 1acc511..fa4a218 100644
--- a/src/commands/settings/_meta.ts
+++ b/src/commands/settings/_meta.ts
@@ -3,6 +3,14 @@
const name = "settings";
const description = "Change bot settings";
-const subcommand = await command(name, description, "settings", undefined, undefined, undefined, ["ManageGuild"]);
+const subcommand: Awaited<ReturnType<typeof command>> = await command(
+ name,
+ description,
+ "settings",
+ undefined,
+ undefined,
+ undefined,
+ ["ManageGuild"]
+);
export { name, description, subcommand as command };
diff --git a/src/commands/settings/logs/_meta.ts b/src/commands/settings/logs/_meta.ts
index b1fe78e..29e65b1 100644
--- a/src/commands/settings/logs/_meta.ts
+++ b/src/commands/settings/logs/_meta.ts
@@ -3,6 +3,6 @@
const name = "logs";
const description = "Settings for logging";
-const subcommand = await group(name, description, `settings/logs`);
+const subcommand: Awaited<ReturnType<typeof group>> = await group(name, description, `settings/logs`);
export { name, description, subcommand as command };
diff --git a/src/commands/tags/_meta.ts b/src/commands/tags/_meta.ts
index aa4fe55..88e2072 100644
--- a/src/commands/tags/_meta.ts
+++ b/src/commands/tags/_meta.ts
@@ -3,6 +3,6 @@
const name = "tags";
const description = "manage server tags";
-const subcommand = await command(name, description, `tags`);
+const subcommand: Awaited<ReturnType<typeof command>> = await command(name, description, `tags`);
export { name, description, subcommand as command };
diff --git a/src/commands/ticket/_meta.ts b/src/commands/ticket/_meta.ts
index 2e0dbbf..8f90612 100644
--- a/src/commands/ticket/_meta.ts
+++ b/src/commands/ticket/_meta.ts
@@ -3,6 +3,6 @@
const name = "ticket";
const description = "Manage modmail tickets";
-const subcommand = await command(name, description, `ticket`);
+const subcommand: Awaited<ReturnType<typeof command>> = await command(name, description, `ticket`);
export { name, description, subcommand as command };
diff --git a/src/commands/user/_meta.ts b/src/commands/user/_meta.ts
index 0c8bc6b..b496c87 100644
--- a/src/commands/user/_meta.ts
+++ b/src/commands/user/_meta.ts
@@ -3,6 +3,6 @@
const name = "user";
const description = "Commands for user info";
-const subcommand = await command(name, description, `user`);
+const subcommand: Awaited<ReturnType<typeof command>> = await command(name, description, `user`);
export { name, description, subcommand as command };
diff --git a/src/events/channelUpdate.ts b/src/events/channelUpdate.ts
index adfe87f..2fc2a33 100644
--- a/src/events/channelUpdate.ts
+++ b/src/events/channelUpdate.ts
@@ -4,10 +4,10 @@
import humanizeDuration from "humanize-duration";
import type { NucleusClient } from "../utils/client.js";
import getEmojiByName from "../utils/getEmojiByName.js";
-import c from "../utils/client.js";
+import client from "../utils/client.js";
import { capitalize } from "../utils/generateKeyValueList.js";
-let entry = c.logger.entry;
+let entry = client.logger.entry;
const channelTypeEmoji: Record<number, string> = {
0: "Text", // Text channel
@@ -18,7 +18,7 @@
99: "Rules" // Rules channel
};
-interface channelChanges {
+type channelChanges = {
channelId: ReturnType<typeof entry>;
channel: ReturnType<typeof entry>;
edited: ReturnType<typeof entry>;
@@ -37,11 +37,12 @@
region?: ReturnType<typeof entry>;
maxUsers?: ReturnType<typeof entry>;
autoArchiveDuration?: ReturnType<typeof entry>;
+ [key: string]: unknown;
}
export const event = "channelUpdate";
-export async function callback(client: NucleusClient, oldChannel: GuildChannel, newChannel: GuildChannel) {
+export async function callback(_client: NucleusClient, oldChannel: GuildChannel, newChannel: GuildChannel) {
const { getAuditLog, log, isLogging, NucleusColors, renderDelta, renderUser, renderChannel } = client.logger;
if (!(await isLogging(newChannel.guild.id, "channelUpdate"))) return;
const config = await client.memory.readGuildInfo(newChannel.guild.id);
diff --git a/src/events/messageEdit.ts b/src/events/messageEdit.ts
index 620842f..f41901c 100644
--- a/src/events/messageEdit.ts
+++ b/src/events/messageEdit.ts
@@ -113,7 +113,7 @@
emoji: "MESSAGE.EDIT",
timestamp: newMessage.editedTimestamp,
files: [
- new AttachmentBuilder(Buffer.from(JSON.stringify(differences), 'base64'), {
+ new AttachmentBuilder(Buffer.from(JSON.stringify(differences), "base64"), {
name: "diff.json",
description: "A JSON file containing the differences between the two messages."
})
diff --git a/src/utils/client.ts b/src/utils/client.ts
index 6899b90..46edbd1 100644
--- a/src/utils/client.ts
+++ b/src/utils/client.ts
@@ -25,7 +25,7 @@
scanCache: ScanCache;
transcripts: Transcript;
};
- GitHub = new Octokit({ auth: config.githubPAT });
+ GitHub: Octokit = new Octokit({ auth: config.githubPAT });
preloadPage: Record<string, { command: string; argument: string }> = {}; // e.g. { channelID: { command: privacy, page: 3}}
commands: Record<
string,
diff --git a/src/utils/getEmojiByName.ts b/src/utils/getEmojiByName.ts
index ebcb257..56f1444 100644
--- a/src/utils/getEmojiByName.ts
+++ b/src/utils/getEmojiByName.ts
@@ -18,7 +18,7 @@
}
getEmojiPaths(emojis);
-function getEmojiByName(name: (typeof EMOJIPATHS)[number], format?: string): string {
+function getEmojiByName(name: typeof EMOJIPATHS[number], format?: string): string {
const parts = name.split(".");
let id: string | EmojisIndex | EmojisIndex[] | undefined = emojis;
for (const part of parts) {
diff --git a/src/utils/log.ts b/src/utils/log.ts
index bae82dd..30804b3 100644
--- a/src/utils/log.ts
+++ b/src/utils/log.ts
@@ -27,7 +27,7 @@
)[];
showDetails?: boolean;
};
- list: Record<string, unknown>;
+ list: Record<string | symbol | number, unknown>;
hidden: {
guild: string;
};