UNPKG

dressed

Version:

A sleek, serverless-ready Discord bot framework.

88 lines (87 loc) 5.16 kB
import type { RESTGetAPIApplicationCommandsResult, RESTGetAPIApplicationCommandsQuery, RESTPostAPIApplicationCommandsJSONBody, RESTPostAPIApplicationCommandsResult, Snowflake, RESTGetAPIApplicationCommandResult, RESTPatchAPIApplicationCommandJSONBody, RESTPatchAPIApplicationCommandResult, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTGetAPIApplicationCommandPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody } from "discord-api-types/v10"; /** * Fetch all of the global commands for your application. * @param options Optional parameters for the request */ export declare function listGlobalCommands(options?: RESTGetAPIApplicationCommandsQuery): Promise<RESTGetAPIApplicationCommandsResult>; /** * Create a new global command. * @param data The command data */ export declare function createGlobalCommand(data: RESTPostAPIApplicationCommandsJSONBody): Promise<RESTPostAPIApplicationCommandsResult>; /** * Fetch a global command for your application. * @param command The command to get */ export declare function getGlobalCommand(command: Snowflake): Promise<RESTGetAPIApplicationCommandResult>; /** * Edit a global command. * @param command The command to edit * @param data The new command data */ export declare function modifyGlobalCommand(command: Snowflake, data: RESTPatchAPIApplicationCommandJSONBody): Promise<RESTPatchAPIApplicationCommandResult>; /** * Deletes a global command. * @param command The command to delete */ export declare function deleteGlobalCommand(command: Snowflake): Promise<void>; /** * Takes a list of application commands, overwriting the existing global command list for this application. * @param data The commands to use */ export declare function bulkOverwriteGlobalCommands(data: RESTPutAPIApplicationCommandsJSONBody): Promise<RESTPutAPIApplicationCommandsResult>; /** * Fetch all of the guild commands for your application for a specific guild. * @param guild The commands to fetch from * @param options Optional parameters for the request */ export declare function listGuildCommands(guild: Snowflake, options?: RESTGetAPIApplicationGuildCommandsQuery): Promise<RESTGetAPIApplicationGuildCommandsResult>; /** * Create a guild global command. * @param guild The guild to create the command in * @param data The command data */ export declare function createGuildCommand(guild: Snowflake, data: RESTPostAPIApplicationGuildCommandsJSONBody): Promise<RESTPostAPIApplicationGuildCommandsResult>; /** * Fetch a guild command for your application. * @param guild The guild to get the command from * @param command The command to get */ export declare function getGuildCommand(guild: Snowflake, command: Snowflake): Promise<RESTGetAPIApplicationGuildCommandResult>; /** * Edit a guild command. * @param guild The guild to edit the command in * @param command The command to edit * @param data The new command data */ export declare function modifyGuildCommand(guild: Snowflake, command: Snowflake, data: RESTPatchAPIApplicationGuildCommandJSONBody): Promise<RESTPatchAPIApplicationGuildCommandResult>; /** * Deletes a guild command. * @param guild The guild to delete the command from * @param command The command to delete */ export declare function deleteGuildCommand(guild: Snowflake, command: Snowflake): Promise<void>; /** * Takes a list of application commands, overwriting the existing command list for this application for the targeted guild. * @param guild The guild to overwrite in * @param data The commands to use */ export declare function bulkOverwriteGuildCommands(guild: Snowflake, data: RESTPutAPIApplicationGuildCommandsJSONBody): Promise<RESTPutAPIApplicationGuildCommandsResult>; /** * Fetches permissions for all commands for your application in a guild. * @param guild The guild to fetch from */ export declare function listGuildCommandsPermissions(guild: Snowflake): Promise<RESTGetAPIGuildApplicationCommandsPermissionsResult>; /** * Fetches permissions for a specific command for your application in a guild. * @param guild The guild to fetch from * @param command The command to fetch */ export declare function getGuildCommandPermissions(guild: Snowflake, command: Snowflake): Promise<RESTGetAPIApplicationCommandPermissionsResult>; /** * Edits command permissions for a specific command for your application in a guild. * @param guild The guild to edit in * @param command The command to edit * @param data The new permissions for the command */ export declare function modifyGuildCommandPermissions(guild: Snowflake, command: Snowflake, data: RESTPutAPIApplicationCommandPermissionsJSONBody): Promise<RESTGetAPIApplicationCommandPermissionsResult>;