commandkit 0.1.11-dev.20250216081126 → 0.1.11-dev.20250216145024

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -227,7 +227,9 @@ interface CommandOptions {
227
227
  botPermissions?: PermissionsString | PermissionsString[];
228
228
  [key: string]: any;
229
229
  }
230
- type CommandData = RESTPostAPIApplicationCommandsJSONBody;
230
+ type CommandData = RESTPostAPIApplicationCommandsJSONBody & {
231
+ guilds?: string[];
232
+ };
231
233
  type CommandObject = {
232
234
  /**
233
235
  * An object which defines the structure of the application command.
@@ -1061,12 +1063,10 @@ declare function getContext(): CommandKitEnvironment | undefined;
1061
1063
  declare function useEnvironment(): CommandKitEnvironment;
1062
1064
  /**
1063
1065
  * Ensures the command is only available in guilds.
1064
- * Note: do not wrap this function in a try/catch block.
1065
1066
  */
1066
1067
  declare function guildOnly(): void;
1067
1068
  /**
1068
1069
  * Ensures the command is only available in DMs.
1069
- * Note: do not wrap this function in a try/catch block.
1070
1070
  */
1071
1071
  declare function dmOnly(): void;
1072
1072
 
@@ -1360,6 +1360,7 @@ interface AppCommandMiddleware {
1360
1360
  interface LoadedCommand {
1361
1361
  command: ParsedCommand;
1362
1362
  data: AppCommand;
1363
+ guilds?: string[];
1363
1364
  }
1364
1365
  interface LoadedMiddleware {
1365
1366
  middleware: ParsedMiddleware;
@@ -1376,7 +1377,7 @@ declare class AppCommandHandler {
1376
1377
  private loadedCommands;
1377
1378
  private loadedMiddlewares;
1378
1379
  constructor(commandkit: CommandKit);
1379
- getCommandsArray(): any[];
1380
+ getCommandsArray(): LoadedCommand[];
1380
1381
  prepareCommandRun(source: Interaction | Message): Promise<PreparedAppCommandExecution | null>;
1381
1382
  loadCommands(): Promise<void>;
1382
1383
  applyLocalizations(command: CommandBuilderLike): Promise<discord_js.RESTPostAPIContextMenuApplicationCommandsJSONBody | CommandBuilderLike>;
package/dist/index.d.ts CHANGED
@@ -227,7 +227,9 @@ interface CommandOptions {
227
227
  botPermissions?: PermissionsString | PermissionsString[];
228
228
  [key: string]: any;
229
229
  }
230
- type CommandData = RESTPostAPIApplicationCommandsJSONBody;
230
+ type CommandData = RESTPostAPIApplicationCommandsJSONBody & {
231
+ guilds?: string[];
232
+ };
231
233
  type CommandObject = {
232
234
  /**
233
235
  * An object which defines the structure of the application command.
@@ -1061,12 +1063,10 @@ declare function getContext(): CommandKitEnvironment | undefined;
1061
1063
  declare function useEnvironment(): CommandKitEnvironment;
1062
1064
  /**
1063
1065
  * Ensures the command is only available in guilds.
1064
- * Note: do not wrap this function in a try/catch block.
1065
1066
  */
1066
1067
  declare function guildOnly(): void;
1067
1068
  /**
1068
1069
  * Ensures the command is only available in DMs.
1069
- * Note: do not wrap this function in a try/catch block.
1070
1070
  */
1071
1071
  declare function dmOnly(): void;
1072
1072
 
@@ -1360,6 +1360,7 @@ interface AppCommandMiddleware {
1360
1360
  interface LoadedCommand {
1361
1361
  command: ParsedCommand;
1362
1362
  data: AppCommand;
1363
+ guilds?: string[];
1363
1364
  }
1364
1365
  interface LoadedMiddleware {
1365
1366
  middleware: ParsedMiddleware;
@@ -1376,7 +1377,7 @@ declare class AppCommandHandler {
1376
1377
  private loadedCommands;
1377
1378
  private loadedMiddlewares;
1378
1379
  constructor(commandkit: CommandKit);
1379
- getCommandsArray(): any[];
1380
+ getCommandsArray(): LoadedCommand[];
1380
1381
  prepareCommandRun(source: Interaction | Message): Promise<PreparedAppCommandExecution | null>;
1381
1382
  loadCommands(): Promise<void>;
1382
1383
  applyLocalizations(command: CommandBuilderLike): Promise<discord_js.RESTPostAPIContextMenuApplicationCommandsJSONBody | CommandBuilderLike>;