UNPKG

meocord

Version:

MeoCord is a lightweight and modular framework for building scalable Discord bots using TypeScript and Discord.js. It simplifies bot development with an extensible architecture, TypeScript-first approach, and powerful CLI tools.

63 lines (62 loc) 2.61 kB
/** * MeoCord Framework * Copyright (C) 2025 Ukasyah Rahmatullah Zada * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * * @param command - The command for which to configure help. */ import { Argument, Command, Help, Option } from 'commander'; export declare function configureCommandHelp(command: Command): void; /** * Formats the help output for a command. * * @param cmd - The command for which to format help. * @param helper - The helper object for formatting. * @param options - The options available for the command. * @returns The formatted help text. */ export declare function formatHelp(cmd: Command, helper: Help, options: readonly Option[]): string; /** * Generates a table of commands with their aliases and descriptions. * * @param cmd - The command for which to generate the table. * @returns The formatted table of commands. */ export declare function generateCommandsTable(cmd: Command): string; /** * Generates a table of commands with their aliases and descriptions. * * @param options * @param helper * @returns The formatted table of commands. */ export declare function generateOptionsTable(options: readonly Option[], helper: Help): string; /** * Generates a formatted table of arguments for the specified command. * * This method creates two tables: * 1. A table displaying argument names and their descriptions. * 2. (If applicable) A table showing available choices for arguments with predefined choices. * * @param args - The list of arguments for the command. * @returns A string representation of the formatted tables, including available arguments and their choices. */ export declare function generateArgumentsTable(args: readonly Argument[]): string; /** * Ensures that the script is being run from the root directory of the project. * Validates the existence of required files, dependencies, and configuration. * If validation fails, it logs an error message and terminates the process. */ export declare function ensureReady(): Promise<void>;