trivious 2.2.0 → 2.2.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.
- package/README.md +1 -1
- package/dist/features/components/builders.components.d.ts +3 -3
- package/dist/features/components/builders.components.js +1 -3
- package/dist/features/components/builders.components.js.map +1 -1
- package/dist/index.d.ts +7 -4
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ const client = new TriviousClient({
|
|
|
42
42
|
|
|
43
43
|
// Auto-deploy slash commands.
|
|
44
44
|
// Using the commandHash feature is recommended
|
|
45
|
-
// since it won't redeploy unchanged commands every restart
|
|
45
|
+
// since it won't redeploy unchanged commands every restart.
|
|
46
46
|
commandHashConfig: {
|
|
47
47
|
enabled: true,
|
|
48
48
|
persistentDataPath: "data",
|
|
@@ -14,18 +14,18 @@ declare function createComponent<Context extends ComponentContext = ComponentCon
|
|
|
14
14
|
* @param data Component data
|
|
15
15
|
* @returns Button Component
|
|
16
16
|
*/
|
|
17
|
-
declare function createButtonComponent(data: Omit<Component
|
|
17
|
+
declare function createButtonComponent(data: Omit<Component<ComponentContext.Button>, "context" | "component">): Component<ComponentContext.Button>;
|
|
18
18
|
/**
|
|
19
19
|
* Create a select menu component handler
|
|
20
20
|
* @param data Component data
|
|
21
21
|
* @returns AnySelectMenu Component
|
|
22
22
|
*/
|
|
23
|
-
declare function createSelectMenuComponent(data: Omit<Component
|
|
23
|
+
declare function createSelectMenuComponent(data: Omit<Component<ComponentContext.SelectMenu>, "context" | "component">): Component<ComponentContext.SelectMenu>;
|
|
24
24
|
/**
|
|
25
25
|
* Create a modal component handler
|
|
26
26
|
* @param data Component data
|
|
27
27
|
* @returns Modal Component
|
|
28
28
|
*/
|
|
29
|
-
declare function createModalComponent(data: Omit<Component
|
|
29
|
+
declare function createModalComponent(data: Omit<Component<ComponentContext.Modal>, "context" | "component">): Component<ComponentContext.Modal>;
|
|
30
30
|
|
|
31
31
|
export { createButtonComponent, createComponent, createModalComponent, createSelectMenuComponent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/components/builders.components.ts"],"names":[],"mappings":";;AAOO,SAAS,gBACf,IAAA,EACqB;AACrB,EAAA,OAAO
|
|
1
|
+
{"version":3,"sources":["../../../src/features/components/builders.components.ts"],"names":[],"mappings":";;AAOO,SAAS,gBACf,IAAA,EACqB;AACrB,EAAA,OAAO,IAAA;AACR;AAOO,SAAS,sBACf,IAAA,EACqC;AACrC,EAAA,OAAO;AAAA,IACN,SAAS,gBAAA,CAAiB,MAAA;AAAA,IAC1B,GAAG;AAAA,GACJ;AACD;AAOO,SAAS,0BACf,IAAA,EACyC;AACzC,EAAA,OAAO;AAAA,IACN,SAAS,gBAAA,CAAiB,UAAA;AAAA,IAC1B,GAAG;AAAA,GACJ;AACD;AAOO,SAAS,qBACf,IAAA,EACoC;AACpC,EAAA,OAAO;AAAA,IACN,SAAS,gBAAA,CAAiB,KAAA;AAAA,IAC1B,GAAG;AAAA,GACJ;AACD","file":"builders.components.js","sourcesContent":["import { Component, ComponentContext } from \"#typings\";\n\n/**\n * Create component handler\n * @param data Component data\n * @returns Component\n */\nexport function createComponent<Context extends ComponentContext = ComponentContext>(\n\tdata: Component<Context>\n): Component<Context> {\n\treturn data;\n}\n\n/**\n * Create a button component handler\n * @param data Component data\n * @returns Button Component\n */\nexport function createButtonComponent(\n\tdata: Omit<Component<ComponentContext.Button>, \"context\" | \"component\">\n): Component<ComponentContext.Button> {\n\treturn {\n\t\tcontext: ComponentContext.Button,\n\t\t...data,\n\t};\n}\n\n/**\n * Create a select menu component handler\n * @param data Component data\n * @returns AnySelectMenu Component\n */\nexport function createSelectMenuComponent(\n\tdata: Omit<Component<ComponentContext.SelectMenu>, \"context\" | \"component\">\n): Component<ComponentContext.SelectMenu> {\n\treturn {\n\t\tcontext: ComponentContext.SelectMenu,\n\t\t...data,\n\t};\n}\n\n/**\n * Create a modal component handler\n * @param data Component data\n * @returns Modal Component\n */\nexport function createModalComponent(\n\tdata: Omit<Component<ComponentContext.Modal>, \"context\" | \"component\">\n): Component<ComponentContext.Modal> {\n\treturn {\n\t\tcontext: ComponentContext.Modal,\n\t\t...data,\n\t};\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
export { createActionRow, createEmbed } from './features/builders/utility.builders.js';
|
|
2
|
-
export { createMessageContextCommand, createSlashCommand, createSlashSubcommand, createSlashSubcommandGroup, createSubcommand, createSubcommandGroup, createUserContextCommand } from './features/commands/builders.commands.js';
|
|
3
|
-
export { handleSlashCommand, interactionReply } from './features/commands/methods.commands.js';
|
|
4
|
-
export { default as customId } from './features/customId/methods.customid.js';
|
|
5
1
|
export { CommandHashConfiguration, FeatureBasedStructure, TriviousClientCredentials, TriviousClientOptions, TriviousStructure, TypeBasedStructure } from './features/client/client.types.js';
|
|
6
2
|
export { B as BaseChatInputCommandData, a as BaseCommandData, C as ChatInputCommandContext, b as CommandFlags, c as CommandFunction, d as Component, e as ComponentContext, f as ComponentFlags, g as ComponentInteraction, h as ContextCommandData, E as Event, M as Module, S as SlashCommandData, i as SlashSubcommandData, j as SlashSubcommandGroupData, T as TriviousClient } from './modules.types-lYoNHt-m.js';
|
|
7
3
|
export { ComponentCustomId, ComponentTag } from './features/customId/customid.types.js';
|
|
8
4
|
export { CommandPermissionValues } from './features/permissions/permissions.types.js';
|
|
5
|
+
export { createActionRow, createEmbed } from './features/builders/utility.builders.js';
|
|
6
|
+
export { handleSlashCommand, interactionReply } from './features/commands/methods.commands.js';
|
|
7
|
+
export { default as customId } from './features/customId/methods.customid.js';
|
|
8
|
+
export { createMessageContextCommand, createSlashCommand, createSlashSubcommand, createSlashSubcommandGroup, createSubcommand, createSubcommandGroup, createUserContextCommand } from './features/commands/builders.commands.js';
|
|
9
|
+
export { createButtonComponent, createComponent, createModalComponent, createSelectMenuComponent } from './features/components/builders.components.js';
|
|
10
|
+
export { createEvent, createOnceEvent } from './features/events/builders.events.js';
|
|
11
|
+
export { createModule } from './features/modules/builders.modules.js';
|
|
9
12
|
import 'discord.js';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export * from './shared/typings.js';
|
|
1
2
|
export * from './features/builders/utility.builders.js';
|
|
2
|
-
export * from './features/commands/builders.commands.js';
|
|
3
3
|
export * from './features/commands/methods.commands.js';
|
|
4
4
|
export { default as customId } from './features/customId/methods.customid.js';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './features/commands/builders.commands.js';
|
|
6
|
+
export * from './features/components/builders.components.js';
|
|
7
|
+
export * from './features/events/builders.events.js';
|
|
8
|
+
export * from './features/modules/builders.modules.js';
|
|
6
9
|
//# sourceMappingURL=index.js.map
|
|
7
10
|
//# sourceMappingURL=index.js.map
|