UNPKG

commandbot

Version:

A framework that helps you create your own Discord bot easier.

78 lines (77 loc) 2.22 kB
import { Interaction, Message, MessageEmbed, ColorResolvable } from "discord.js"; import { ChatCommand } from "./ChatCommand.js"; import { CommandManager } from "../structures/CommandManager.js"; import { EphemeralType } from "./commandsTypes.js"; /** * All properties used to customize the appearance of a help message * @interface */ export interface HelpMessageParams { /** * Whether help message is enabled * @type {boolean} */ enabled: boolean; /** * Title field * @type {string} */ title: string; /** * Text below the title * @type {?string} */ bottomText?: string; /** * Color of a message * @type {?ColorResolvable} */ color?: ColorResolvable; /** * Description of the "help" command * @type {?string} */ description?: string; /** * Usage of the "help" command * @type {?string} */ usage?: string; /** * Whether the "help" command should be visible in the help message * @type {?boolean} */ visible?: boolean; /** * Whether the response message should be ephemeral * @type {?EphemeralType} */ ephemeral?: EphemeralType; } /** * @class Chat command containing a list of all command in the given manager (help message) */ export declare class HelpMessage extends ChatCommand { /** * Help message appearance options * @type {HelpMessageParams} * @private * @readonly */ private readonly _appearance; /** * Help message constructor * @constructor * @param {CommandManager} cmdManager - command manager related to this command * @param {HelpMessageParams} options - appearance properties */ constructor(cmdManager: CommandManager, options: HelpMessageParams); /** * * @param {Interaction | Message} i - Discord interaction * @param {?string} [cmdName] - command name (if any) * @returns {MessageEmbed} A computed help message in form of {@link MessageEmbed} * @public */ generateMessage(i: Interaction | Message, cmdName?: string): MessageEmbed; }