chore: comments (#156)
Some checks failed
Publish latest version / build (push) Has been cancelled

i am maniac

Reviewed-on: #156
Co-authored-by: Mylloon <kennel.anri@tutanota.com>
Co-committed-by: Mylloon <kennel.anri@tutanota.com>
This commit is contained in:
Mylloon 2024-09-04 13:01:17 +02:00 committed by Mylloon
parent aded2add59
commit 47236cb63c
Signed by: Forgejo
GPG key ID: E72245C752A07631
8 changed files with 17 additions and 17 deletions

View file

@ -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 ?? "");

View file

@ -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"),

View file

@ -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...");

View file

@ -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;
}

View file

@ -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: [

View file

@ -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

View file

@ -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
*/

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