reciple 1.1.1 → 1.1.2

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.
@@ -1,7 +1,8 @@
1
- import { ApplicationCommandData, Client, ClientEvents, ClientOptions, Interaction, Message } from 'discord.js';
1
+ import { ApplicationCommandDataResolvable, Client, ClientEvents, ClientOptions, Interaction, Message } from 'discord.js';
2
2
  import { Logger as LoggerConstructor } from 'fallout-utility';
3
3
  import { MessageCommandBuilder, RecipleMessageCommandExecute } from './builders/MessageCommandBuilder';
4
4
  import { InteractionCommandBuilder, RecipleInteractionCommandExecute } from './builders/InteractionCommandBuilder';
5
+ import { commandBuilders } from '../registerInteractionCommands';
5
6
  import { RecipleScript } from '../modules';
6
7
  import { Config } from './Config';
7
8
  export interface RecipleClientOptions extends ClientOptions {
@@ -22,7 +23,7 @@ export interface RecipleClientEvents extends ClientEvents {
22
23
  export declare class RecipleClient extends Client {
23
24
  config?: Config;
24
25
  commands: RecipleClientCommands;
25
- otherApplicationCommandData: ApplicationCommandData[];
26
+ otherApplicationCommandData: (commandBuilders | ApplicationCommandDataResolvable)[];
26
27
  modules: RecipleScript[];
27
28
  logger: LoggerConstructor;
28
29
  version: string;
@@ -1,5 +1,6 @@
1
1
  import { InteractionCommandBuilder } from './classes/builders/InteractionCommandBuilder';
2
- import { SlashCommandBuilder } from '@discordjs/builders';
3
2
  import { RecipleClient } from "./classes/Client";
4
- import { ApplicationCommandData } from 'discord.js';
5
- export declare function registerInteractionCommands(client: RecipleClient, cmds?: (InteractionCommandBuilder | SlashCommandBuilder | ApplicationCommandData)[]): Promise<void>;
3
+ import { ApplicationCommandDataResolvable } from 'discord.js';
4
+ import { ContextMenuCommandBuilder, SlashCommandBuilder, SlashCommandSubcommandBuilder, SlashCommandOptionsOnlyBuilder, SlashCommandSubcommandGroupBuilder, SlashCommandSubcommandsOnlyBuilder } from '@discordjs/builders';
5
+ export declare type commandBuilders = InteractionCommandBuilder | ContextMenuCommandBuilder | SlashCommandBuilder | SlashCommandSubcommandBuilder | SlashCommandOptionsOnlyBuilder | SlashCommandSubcommandGroupBuilder | SlashCommandSubcommandsOnlyBuilder;
6
+ export declare function registerInteractionCommands(client: RecipleClient, cmds?: (commandBuilders | ApplicationCommandDataResolvable)[]): Promise<void>;
@@ -18,7 +18,7 @@ function registerInteractionCommands(client, cmds) {
18
18
  return c.toJSON();
19
19
  return c;
20
20
  })) !== null && _a !== void 0 ? _a : [];
21
- if (!commands.length) {
21
+ if (!commands || !commands.length) {
22
22
  client.logger.warn('No interaction commands found.');
23
23
  return;
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reciple",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "A Discord.js bot",
5
5
  "author": "FalloutStudios",
6
6
  "license": "GPL-3.0",
@@ -31,7 +31,7 @@
31
31
  "yaml": "^2.0.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@types/node": "^17.0.24",
35
- "typescript": "^4.6.3"
34
+ "@types/node": "^17.0.31",
35
+ "typescript": "^4.6.4"
36
36
  }
37
37
  }