@wilcosp/rex
Version:
Rex is an automated command manager for discord js
31 lines (30 loc) • 1.87 kB
TypeScript
/*!
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { AutocompleteInteraction, ChatInputCommandInteraction } from "discord.js";
import { RexApplicationCommandBase } from "../applicationCommandBase.js";
import { RexAutoCompleteInteraction } from "../interactions/slashCommands/autocomplete.js";
import { RexSlashCommandInteraction } from "../interactions/slashCommands/slashCommand.js";
import { RexChatInputCommandInfo, RexContextCommandInfo, RexGroupCommandInfo, RexSubCommandInfo } from "../types/types";
import { RexSlashCommand } from "./command.js";
type RexHelpExecute<inter extends RexAutoCompleteInteraction | RexSlashCommandInteraction, T extends RexChatInputCommandInfo | null> = (this: T, value: inter, commands: {
chatInput: Map<string, RexChatInputCommandInfo | RexSubCommandInfo | RexGroupCommandInfo>;
user: Map<string, RexContextCommandInfo>;
message: Map<string, RexContextCommandInfo>;
}) => void | Promise<unknown>;
export declare class RexSlashHelpCommand extends RexSlashCommand {
private autocompleteHelp?;
private executeHelp?;
setExecute(fun: RexHelpExecute<RexSlashCommandInteraction, RexChatInputCommandInfo>): this;
setAutoCompleteFun(fun: RexHelpExecute<RexAutoCompleteInteraction, null>): this;
private getCommand;
run(int: ChatInputCommandInteraction, commands: Map<string, RexApplicationCommandBase>): void | Promise<unknown>;
runAutoComplete(auto: AutocompleteInteraction, commands: Map<string, RexApplicationCommandBase>): void | Promise<unknown>;
/**
* @ignore this isn't possible with help commands, a help command will always need to be accessible by everyone
*/
setDefaultMemberPermissions(): this;
}
export {};