From 9734bef319cf776335e58b19ec1fa7c1c1eb3a55 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 4 Sep 2024 13:00:34 +0200 Subject: [PATCH] comments --- src/commands/loader.ts | 2 +- src/events/loader.ts | 2 +- src/load.ts | 2 +- src/modules/string.ts | 2 +- src/utils/client.ts | 2 +- src/utils/locales.ts | 10 +++++----- src/utils/misc.ts | 12 ++++++------ src/utils/time.ts | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/commands/loader.ts b/src/commands/loader.ts index b035a1e..747a418 100644 --- a/src/commands/loader.ts +++ b/src/commands/loader.ts @@ -4,7 +4,7 @@ import { Client } from "discord.js"; import { readdir } from "fs/promises"; import { removeExtension } from "../utils/misc"; -/** Load all the commands. */ +/** Load all the commands */ export default async (client: Client) => { const rest = new REST({ version: "10" }).setToken(client.token ?? ""); diff --git a/src/events/loader.ts b/src/events/loader.ts index d0ee1c0..d84e63b 100644 --- a/src/events/loader.ts +++ b/src/events/loader.ts @@ -2,7 +2,7 @@ import { Player, PlayerEvents, useMainPlayer } from "discord-player"; import { Client } from "discord.js"; import { readdir } from "fs/promises"; -/** Load all the events. */ +/** Load all the events */ export default async (client: Client) => { const events_categories = (await readdir(__dirname)).filter( (element) => !element.endsWith(".js") && !element.endsWith(".ts"), diff --git a/src/load.ts b/src/load.ts index 870e7eb..560e4a7 100644 --- a/src/load.ts +++ b/src/load.ts @@ -6,7 +6,7 @@ import loadClient, { quit } from "./utils/client"; import { logStart } from "./utils/misc"; -/** Run the bot. */ +/** Run the bot */ export const run = async () => { console.log("Starting Botanique..."); diff --git a/src/modules/string.ts b/src/modules/string.ts index b0c5cf9..fc87c0e 100644 --- a/src/modules/string.ts +++ b/src/modules/string.ts @@ -4,7 +4,7 @@ declare global { // Declarations interface String { /** - * Returns a copy of the string with the first letter capitalized. + * Returns a copy of the string with the first letter capitalized */ capitalize(): string; } diff --git a/src/utils/client.ts b/src/utils/client.ts index 9711c80..d4aeeb3 100644 --- a/src/utils/client.ts +++ b/src/utils/client.ts @@ -6,7 +6,7 @@ import "../modules/client"; import { loadLocales } from "./locales"; import { YoutubeiExtractor } from "discord-player-youtubei"; -/** Creation of the client and definition of its properties. */ +/** Creation of the client and definition of its properties */ export default async () => { const client: Client = new Client({ intents: [ diff --git a/src/utils/locales.ts b/src/utils/locales.ts index 4d446f4..eb8bd18 100644 --- a/src/utils/locales.ts +++ b/src/utils/locales.ts @@ -3,7 +3,7 @@ import { readdir } from "fs/promises"; import { removeExtension } from "./misc"; /** - * Load the localizations files into memory. + * Load the localizations files into memory * * Show percentage of translations. * @param default_lang default lang @@ -47,7 +47,7 @@ export const loadLocales = async (default_lang: string) => { /** * Builds a dictionary, if a translation is not available, - * we fallback to default lang. + * we fallback to default lang * @param client Client * @param text Name of string to fetch * @param lowercase Should the output be lowercased? @@ -76,7 +76,7 @@ export const getLocalizations = (client: Client, text: string, lowercase = false /** * Return the locale data for a lang, - * fallback to default language when a string isn't available. + * fallback to default language when a string isn't available * @param client Client * @param lang Lang to fetch * @returns the map with the desired languaged clogged with the default one @@ -101,10 +101,10 @@ export const getLocale = (client: Client, lang: string) => { }; /** - * Show percentage of translation progression. + * Show percentage of translation progression * * Raise an error if the default lang isn't - * the lang with most text. + * the lang with most text * @param locales Locales loaded * @param default_lang default lang * @returns void diff --git a/src/utils/misc.ts b/src/utils/misc.ts index 5240650..8364a59 100644 --- a/src/utils/misc.ts +++ b/src/utils/misc.ts @@ -1,7 +1,7 @@ import { GuildMember } from "discord.js"; /** - * Log module status. + * Log module status * @param {string} name Module name * @param {boolean} status Module status * @returns String @@ -12,7 +12,7 @@ export const logStart = (name: string, status: boolean) => { }; /** - * Filename without path and extension. + * Filename without path and extension * @param path __filename * @returns string */ @@ -29,7 +29,7 @@ export const getFilename = (path: string) => { }; /** - * Remove extension from a filename. + * Remove extension from a filename * @param filename string of the filename with an extension * @returns string of the filename without an extension */ @@ -41,7 +41,7 @@ export const removeExtension = (filename: string) => { }; /** - * Get extension from a filename. + * Get extension from a filename * @param filename string of the filename * @returns string of the extension if it exists */ @@ -52,7 +52,7 @@ export const getExtension = (filename: string) => { }; /** - * Define if a media is a media based on file extension. + * Define if a media is a media based on file extension * @param filename string of the filename * @returns true is file is a media */ @@ -61,7 +61,7 @@ export const isImage = (filename: string) => { }; /** - * String with pseudo and nickname if available. + * String with pseudo and nickname if available * @param member Member * @returns string */ diff --git a/src/utils/time.ts b/src/utils/time.ts index ea6d687..95d8728 100644 --- a/src/utils/time.ts +++ b/src/utils/time.ts @@ -1,5 +1,5 @@ /** - * Parsed string adapted with TZ (locales) and format for the specified lang. + * Parsed string adapted with TZ (locales) and format for the specified lang * @param tz Lang * @param locale Locales * @param date Date -- 2.45.2