@guardbot/framework 1.1.2 → 1.1.3
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/build/index.d.mts +2 -2
- package/build/index.d.ts +2 -2
- package/build/index.js +3 -1
- package/build/index.mjs +3 -1
- package/package.json +1 -1
package/build/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as discord_js from 'discord.js';
|
|
2
|
-
import { Client, PermissionResolvable, InteractionContextType, ApplicationIntegrationType, LocalizationMap, ApplicationCommandOptionData, ChatInputCommandInteraction, AutocompleteInteraction, Message, ContextMenuCommandInteraction, CommandInteraction, PermissionsString, Interaction, Collection, ClientEvents, ModalSubmitInteraction, ClientOptions, MessageCollectorOptions, InteractionCollectorOptions } from 'discord.js';
|
|
2
|
+
import { Client, PermissionResolvable, InteractionContextType, ApplicationIntegrationType, LocalizationMap, ApplicationCommandOptionData, ToAPIApplicationCommandOptions, ChatInputCommandInteraction, AutocompleteInteraction, Message, ContextMenuCommandInteraction, CommandInteraction, PermissionsString, Interaction, Collection, ClientEvents, ModalSubmitInteraction, ClientOptions, MessageCollectorOptions, InteractionCollectorOptions } from 'discord.js';
|
|
3
3
|
export { SlashCommandAttachmentOption as AttachmentOption, SlashCommandBooleanOption as BooleanOption, SlashCommandChannelOption as ChannelOption, SlashCommandIntegerOption as IntegerOption, SlashCommandMentionableOption as MentionableOption, SlashCommandNumberOption as NumberOption, SlashCommandRoleOption as RoleOption, SlashCommandStringOption as StringOption, SlashCommandSubcommandBuilder as SubcommandBuilder, SlashCommandSubcommandGroupBuilder as SubcommandGroupBuilder, SlashCommandUserOption as UserOption } from 'discord.js';
|
|
4
4
|
import EventEmitter from 'events';
|
|
5
5
|
|
|
@@ -72,7 +72,7 @@ interface MessageCommandOptions$1 extends BaseCommandOptions {
|
|
|
72
72
|
interface SlashCommandOptions$1 extends BaseAppCommandOptions {
|
|
73
73
|
commandType: 'Slash';
|
|
74
74
|
/** The Application Command Options of this Command */
|
|
75
|
-
options?: ApplicationCommandOptionData[];
|
|
75
|
+
options?: (ApplicationCommandOptionData | ToAPIApplicationCommandOptions)[];
|
|
76
76
|
execute: (client: FrameworkClient<true>, interaction: ChatInputCommandInteraction) => Promise<unknown>;
|
|
77
77
|
autocomplete?: (client: FrameworkClient<true>, interaction: AutocompleteInteraction) => Promise<unknown>;
|
|
78
78
|
}
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as discord_js from 'discord.js';
|
|
2
|
-
import { Client, PermissionResolvable, InteractionContextType, ApplicationIntegrationType, LocalizationMap, ApplicationCommandOptionData, ChatInputCommandInteraction, AutocompleteInteraction, Message, ContextMenuCommandInteraction, CommandInteraction, PermissionsString, Interaction, Collection, ClientEvents, ModalSubmitInteraction, ClientOptions, MessageCollectorOptions, InteractionCollectorOptions } from 'discord.js';
|
|
2
|
+
import { Client, PermissionResolvable, InteractionContextType, ApplicationIntegrationType, LocalizationMap, ApplicationCommandOptionData, ToAPIApplicationCommandOptions, ChatInputCommandInteraction, AutocompleteInteraction, Message, ContextMenuCommandInteraction, CommandInteraction, PermissionsString, Interaction, Collection, ClientEvents, ModalSubmitInteraction, ClientOptions, MessageCollectorOptions, InteractionCollectorOptions } from 'discord.js';
|
|
3
3
|
export { SlashCommandAttachmentOption as AttachmentOption, SlashCommandBooleanOption as BooleanOption, SlashCommandChannelOption as ChannelOption, SlashCommandIntegerOption as IntegerOption, SlashCommandMentionableOption as MentionableOption, SlashCommandNumberOption as NumberOption, SlashCommandRoleOption as RoleOption, SlashCommandStringOption as StringOption, SlashCommandSubcommandBuilder as SubcommandBuilder, SlashCommandSubcommandGroupBuilder as SubcommandGroupBuilder, SlashCommandUserOption as UserOption } from 'discord.js';
|
|
4
4
|
import EventEmitter from 'events';
|
|
5
5
|
|
|
@@ -72,7 +72,7 @@ interface MessageCommandOptions$1 extends BaseCommandOptions {
|
|
|
72
72
|
interface SlashCommandOptions$1 extends BaseAppCommandOptions {
|
|
73
73
|
commandType: 'Slash';
|
|
74
74
|
/** The Application Command Options of this Command */
|
|
75
|
-
options?: ApplicationCommandOptionData[];
|
|
75
|
+
options?: (ApplicationCommandOptionData | ToAPIApplicationCommandOptions)[];
|
|
76
76
|
execute: (client: FrameworkClient<true>, interaction: ChatInputCommandInteraction) => Promise<unknown>;
|
|
77
77
|
autocomplete?: (client: FrameworkClient<true>, interaction: AutocompleteInteraction) => Promise<unknown>;
|
|
78
78
|
}
|
package/build/index.js
CHANGED
|
@@ -570,7 +570,9 @@ var CommandsModule = class extends import_events2.default {
|
|
|
570
570
|
integrationTypes: resolveIntegrationTypes(command.integrationTypes),
|
|
571
571
|
nameLocalizations: command.nameLocalizations,
|
|
572
572
|
descriptionLocalizations: command.descriptionLocalizations,
|
|
573
|
-
...command.commandType === "Slash" ? {
|
|
573
|
+
...command.commandType === "Slash" ? {
|
|
574
|
+
options: command.options ? command.options.map((op) => typeof op.toJSON === "function" ? op.toJSON() : op) : []
|
|
575
|
+
} : {}
|
|
574
576
|
};
|
|
575
577
|
}
|
|
576
578
|
};
|
package/build/index.mjs
CHANGED
|
@@ -525,7 +525,9 @@ var CommandsModule = class extends EventEmitter2 {
|
|
|
525
525
|
integrationTypes: resolveIntegrationTypes(command.integrationTypes),
|
|
526
526
|
nameLocalizations: command.nameLocalizations,
|
|
527
527
|
descriptionLocalizations: command.descriptionLocalizations,
|
|
528
|
-
...command.commandType === "Slash" ? {
|
|
528
|
+
...command.commandType === "Slash" ? {
|
|
529
|
+
options: command.options ? command.options.map((op) => typeof op.toJSON === "function" ? op.toJSON() : op) : []
|
|
530
|
+
} : {}
|
|
529
531
|
};
|
|
530
532
|
}
|
|
531
533
|
};
|