@antibot/interactions
Version:
## 🗡️ An interactions library made for Discord interactions
55 lines • 2.83 kB
TypeScript
import type { Snowflake } from './@type';
import { ApplicationCommand } from './ApplicationCommand';
import { ApplicationCommandPermissions } from './ApplicationCommandPermissions';
import { ICommand } from './Command';
type EditGuildCommandOptions = {
guildId: Snowflake;
commandId: Snowflake;
command: ICommand;
};
type EditGuildCommandPermissionsOptions = Omit<EditGuildCommandOptions, 'command'> & Record<'permissions', ApplicationCommandPermissions[]>;
export declare class Interactions {
protected readonly options: {
publicKey: string;
botID: string;
botToken: string;
debug?: boolean;
};
private request;
private api;
private routes;
constructor(options: {
publicKey: string;
botID: string;
botToken: string;
debug?: boolean;
});
get botID(): string;
get botToken(): string;
createGlobalCommand<T>(command: ICommand): Promise<ApplicationCommand>;
createGlobalCommand<T>(command: ICommand): Promise<void>;
getGlobalCommand<T>(commandId: string): Promise<ApplicationCommand>;
getGlobalCommand<T>(commandId: string): Promise<void>;
editGlobalCommand<T>(commandId: Snowflake, command: ICommand): Promise<ApplicationCommand>;
editGlobalCommand<T>(commandId: Snowflake, command: ICommand): Promise<void>;
deleteGlobalCommand(commandId: Snowflake): Promise<void>;
getGlobalCommands<T>(): Promise<ApplicationCommand[]>;
getGlobalCommands<T>(): Promise<void>;
overwriteGlobalCommands(...commands: ICommand[]): Promise<void>;
createGuildCommand<T>(guildId: Snowflake, command: ICommand): Promise<ApplicationCommand>;
createGuildCommand<T>(guildId: Snowflake, command: ICommand): Promise<void>;
getGuildCommands<T>(guildId: Snowflake): Promise<ApplicationCommand[]>;
getGuildCommands<T>(guildId: Snowflake): Promise<void>;
editGuildCommand<T>(options: EditGuildCommandOptions): Promise<ApplicationCommand>;
editGuildCommand<T>(options: EditGuildCommandOptions): Promise<void>;
deleteGuildCommand(guildId: Snowflake, commandId: Snowflake): Promise<void>;
overwriteGuildCommands(guildId: Snowflake, ...commands: ICommand[]): Promise<void>;
getGuildCommand<T>(guildId: Snowflake, commandId: Snowflake): Promise<ApplicationCommand>;
getGuildCommand<T>(guildId: Snowflake, commandId: Snowflake): Promise<void>;
getGuildCommandPermissions<T>(guildId: Snowflake): Promise<ApplicationCommandPermissions[]>;
getGuildCommandPermissions<T>(guildId: Snowflake): Promise<void>;
editGuildCommandPermissions<T>(options: EditGuildCommandPermissionsOptions): Promise<ApplicationCommandPermissions>;
editGuildCommandPermissions<T>(options: EditGuildCommandPermissionsOptions): Promise<void>;
}
export {};
//# sourceMappingURL=Interactions.d.ts.map