chore: comments #156

Merged
Anri merged 1 commit from dots-comment into main 2024-09-04 13:01:18 +02:00
8 changed files with 17 additions and 17 deletions
Showing only changes of commit 9734bef319 - Show all commits

View file

@ -4,7 +4,7 @@ import { Client } from "discord.js";
import { readdir } from "fs/promises"; import { readdir } from "fs/promises";
import { removeExtension } from "../utils/misc"; import { removeExtension } from "../utils/misc";
/** Load all the commands. */ /** Load all the commands */
export default async (client: Client) => { export default async (client: Client) => {
const rest = new REST({ version: "10" }).setToken(client.token ?? ""); const rest = new REST({ version: "10" }).setToken(client.token ?? "");

View file

@ -2,7 +2,7 @@ import { Player, PlayerEvents, useMainPlayer } from "discord-player";
import { Client } from "discord.js"; import { Client } from "discord.js";
import { readdir } from "fs/promises"; import { readdir } from "fs/promises";
/** Load all the events. */ /** Load all the events */
export default async (client: Client) => { export default async (client: Client) => {
const events_categories = (await readdir(__dirname)).filter( const events_categories = (await readdir(__dirname)).filter(
(element) => !element.endsWith(".js") && !element.endsWith(".ts"), (element) => !element.endsWith(".js") && !element.endsWith(".ts"),

View file

@ -6,7 +6,7 @@ import loadClient, { quit } from "./utils/client";
import { logStart } from "./utils/misc"; import { logStart } from "./utils/misc";
/** Run the bot. */ /** Run the bot */
export const run = async () => { export const run = async () => {
console.log("Starting Botanique..."); console.log("Starting Botanique...");

View file

@ -4,7 +4,7 @@ declare global {
// Declarations // Declarations
interface String { 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; capitalize(): string;
} }

View file

@ -6,7 +6,7 @@ import "../modules/client";
import { loadLocales } from "./locales"; import { loadLocales } from "./locales";
import { YoutubeiExtractor } from "discord-player-youtubei"; 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 () => { export default async () => {
const client: Client = new Client({ const client: Client = new Client({
intents: [ intents: [

View file

@ -3,7 +3,7 @@ import { readdir } from "fs/promises";
import { removeExtension } from "./misc"; import { removeExtension } from "./misc";
/** /**
* Load the localizations files into memory. * Load the localizations files into memory
* *
* Show percentage of translations. * Show percentage of translations.
* @param default_lang default lang * @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, * Builds a dictionary, if a translation is not available,
* we fallback to default lang. * we fallback to default lang
* @param client Client * @param client Client
* @param text Name of string to fetch * @param text Name of string to fetch
* @param lowercase Should the output be lowercased? * @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, * 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 client Client
* @param lang Lang to fetch * @param lang Lang to fetch
* @returns the map with the desired languaged clogged with the default one * @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 * Raise an error if the default lang isn't
* the lang with most text. * the lang with most text
* @param locales Locales loaded * @param locales Locales loaded
* @param default_lang default lang * @param default_lang default lang
* @returns void * @returns void

View file

@ -1,7 +1,7 @@
import { GuildMember } from "discord.js"; import { GuildMember } from "discord.js";
/** /**
* Log module status. * Log module status
* @param {string} name Module name * @param {string} name Module name
* @param {boolean} status Module status * @param {boolean} status Module status
* @returns String * @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 * @param path __filename
* @returns string * @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 * @param filename string of the filename with an extension
* @returns string of the filename without 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 * @param filename string of the filename
* @returns string of the extension if it exists * @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 * @param filename string of the filename
* @returns true is file is a media * @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 * @param member Member
* @returns string * @returns string
*/ */

View file

@ -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 tz Lang
* @param locale Locales * @param locale Locales
* @param date Date * @param date Date