You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.4 KiB
28 lines
1.4 KiB
3 years ago
|
import Discord = require("discord.js");
|
||
|
import { RegisterMode, SlashCommand } from "./slash";
|
||
|
export declare class SlashManager {
|
||
|
client: Discord.Client;
|
||
|
commands: SlashCommand[];
|
||
|
testServerId: string;
|
||
|
beforeHandle: (client: Discord.Client, interaction: Discord.CommandInteraction) => any;
|
||
|
afterHandle: (client: Discord.Client, interaction: Discord.CommandInteraction, success: boolean) => any;
|
||
|
private initialized;
|
||
|
private rest;
|
||
|
constructor(client: Discord.Client, commands?: SlashCommand[], testServer?: string);
|
||
|
register(commands?: CommandLookup): Promise<any>;
|
||
|
devRegister(commands?: CommandLookup): Promise<any>;
|
||
|
add(command: SlashCommand, register?: boolean | RegisterMode): SlashManager;
|
||
|
remove(commands: CommandLookup): SlashManager;
|
||
|
getCommand(command: SlashCommand | string): number;
|
||
|
getCommands(commands: SlashCommand[] | string[]): number[];
|
||
|
init(): SlashManager;
|
||
|
disableHandling(): SlashManager;
|
||
|
setBeforeHandle(execute: (client: Discord.Client, interaction: Discord.CommandInteraction) => any): SlashManager;
|
||
|
setAfterHandle(execute: (client: Discord.Client, interaction: Discord.CommandInteraction, success: Boolean) => any): SlashManager;
|
||
|
setTestServer(id: string): SlashManager;
|
||
|
private handle;
|
||
|
importCommands(dir?: string): SlashManager;
|
||
|
}
|
||
|
declare type CommandLookup = SlashCommand[] | SlashCommand | string | string[];
|
||
|
export {};
|