Reformat code
diff --git a/src/utils/database.ts b/src/utils/database.ts
index ddee338..abb638f 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -144,12 +144,14 @@
}
async staffChannels(): Promise<string[]> {
- const entries = (await this.guilds
- .find(
- { "logging.staff.channel": { $exists: true } },
- { projection: { "logging.staff.channel": 1, _id: 0 } }
- )
- .toArray()).map((e) => e.logging.staff.channel);
+ const entries = (
+ await this.guilds
+ .find(
+ { "logging.staff.channel": { $exists: true } },
+ { projection: { "logging.staff.channel": 1, _id: 0 } }
+ )
+ .toArray()
+ ).map((e) => e.logging.staff.channel);
const out: string[] = [];
for (const entry of entries) {
if (entry) out.push(entry);
diff --git a/src/utils/getCommandDataByName.ts b/src/utils/getCommandDataByName.ts
index 70a2af6..dcf45ca 100644
--- a/src/utils/getCommandDataByName.ts
+++ b/src/utils/getCommandDataByName.ts
@@ -2,11 +2,11 @@
import client from "./client.js";
/**
-* @param name The name of the command, not including a leading slash. This can be space or slash separated e.g. "mod/about" or "mod about"
-* @returns A string which when put into Discord will mention the command if the command exists or a codeblock with the command name if it does not
-*
-* @throws Will throw an error if as empty string is passed
-**/
+ * @param name The name of the command, not including a leading slash. This can be space or slash separated e.g. "mod/about" or "mod about"
+ * @returns A string which when put into Discord will mention the command if the command exists or a codeblock with the command name if it does not
+ *
+ * @throws Will throw an error if as empty string is passed
+ **/
export const getCommandMentionByName = (name: string): string => {
const split = name.replaceAll("/", " ").split(" ");
const commandName: string | undefined = split[0];
@@ -23,12 +23,12 @@
};
/**
-* @param name The name of the command, not including a leading slash. This can be space or slash separated e.g. "mod/about" or "mod about"
-* @returns An object containing the command name, the command description and a string which when put into Discord will mention the command
-*
-* @throws Will throw an error if the command doesn't exist
-* @throws Will throw an error if as empty string is passed
-**/
+ * @param name The name of the command, not including a leading slash. This can be space or slash separated e.g. "mod/about" or "mod about"
+ * @returns An object containing the command name, the command description and a string which when put into Discord will mention the command
+ *
+ * @throws Will throw an error if the command doesn't exist
+ * @throws Will throw an error if as empty string is passed
+ **/
export const getCommandByName = (name: string): { name: string; description: string; mention: string } => {
const split = name.replaceAll(" ", "/");
const command = client.commands["commands/" + split];
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/types/recursivePartial.d.ts b/src/utils/types/recursivePartial.d.ts
index 4f5030b..a578bb4 100644
--- a/src/utils/types/recursivePartial.d.ts
+++ b/src/utils/types/recursivePartial.d.ts
@@ -1,6 +1,7 @@
type RecursivePartial<T> = {
- [P in keyof T]?:
- T[P] extends (infer U)[] ? RecursivePartial<U>[] :
- T[P] extends object ? RecursivePartial<T[P]> :
- T[P];
+ [P in keyof T]?: T[P] extends (infer U)[]
+ ? RecursivePartial<U>[]
+ : T[P] extends object
+ ? RecursivePartial<T[P]>
+ : T[P];
};