detritus-client
Version:
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
50 lines (49 loc) • 1.54 kB
TypeScript
import { CommandRatelimit as CommandRatelimitCache, CommandRatelimitItem } from '../commandratelimit';
import { FailedPermissions, ParsedArgs, InteractionCommand } from './command';
import { InteractionContext } from './context';
export declare namespace InteractionCommandEvents {
interface CommandError {
command: InteractionCommand;
context: InteractionContext;
error: Error;
extra?: Record<string, Error>;
}
interface CommandFail {
args: ParsedArgs;
command: InteractionCommand;
context: InteractionContext;
error: Error;
}
interface CommandPermissionsFailClient {
command: InteractionCommand;
context: InteractionContext;
permissions: FailedPermissions;
}
interface CommandPermissionsFail {
command: InteractionCommand;
context: InteractionContext;
permissions: FailedPermissions;
}
interface CommandRatelimit {
command: InteractionCommand;
context: InteractionContext;
global: boolean;
now: number;
ratelimits: Array<{
item: CommandRatelimitItem;
ratelimit: CommandRatelimitCache;
remaining: number;
}>;
}
interface CommandRan {
args: ParsedArgs;
command: InteractionCommand;
context: InteractionContext;
}
interface CommandRunError {
args: ParsedArgs;
command: InteractionCommand;
context: InteractionContext;
error: Error;
}
}