From 6257a0a704e64cc2a2206e445543a6b558b35367 Mon Sep 17 00:00:00 2001 From: powermaker450 Date: Sat, 20 Jul 2024 10:47:04 -0400 Subject: [PATCH] Remove tsdoc comments --- src/utils.ts | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index bd5b98c..48acd4b 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -8,15 +8,6 @@ export function checkFile( encoding: fs.EncodingOption, defaultContent: string, ): Messages { - /** - * Checks if a given JSON file exists and contains valid JSON from a previous message history. - * - * @param file - The file to check. - * @param encoding - The text encoding the given file uses. - * @param defaultContent - The default system message to use if no JSON file was found, or the JSON file does not contain valid JSON. - * - * @returns A list of messages from the given JSON file, or a starter list with just the system messsage. - */ let final: Messages; const generic: Messages = [ { @@ -77,14 +68,6 @@ export function contentOf(response: ChatCompletion): string { } export async function getUserInfo(host: string, id: string) { - /** - * Returns various info about a user given a host and server ID. - * - * @param host - The address of the Tailchat server. - * @param id - The user ID to check. - * - * @returns An object containing all the user data recieved from the server. - */ try { const reply = await fetch(`${host}/api/user/getUserInfo`, { method: "POST", @@ -111,14 +94,6 @@ export async function getUserInfo(host: string, id: string) { } export async function getUsername(host: string, id: string) { - /** - * Gets the username of a given user. - * - * @param host - The address of the Tailchat server. - * @param id - The user ID to check. - * - * @returns The username associated with the given user ID. - */ if (!id) { throw new Error("No user ID was given."); } @@ -129,14 +104,6 @@ export async function getUsername(host: string, id: string) { } export async function isUserBot(host: string, id: string) { - /** - * Returns if the given user is a bot. - * - * @param host - The address of the Tailchat server. - * @param id - The user ID to check. - * - * @returns true if the user ID is associated with a bot, false if not. - */ const reply = await getUserInfo(host, id); return reply.type === "openapiBot";