trivious 2.1.4 → 2.1.5
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/features/client/deploy.client.d.ts +1 -1
- package/dist/features/client/trivious.client.d.ts +1 -1
- package/dist/features/commands/builders.commands.d.ts +1 -1
- package/dist/features/commands/builders.commands.js.map +1 -1
- package/dist/features/commands/commands.types.d.ts +1 -1
- package/dist/features/commands/methods.commands.d.ts +1 -1
- package/dist/features/commands/registry.commands.d.ts +1 -1
- package/dist/features/components/components.types.d.ts +1 -1
- package/dist/features/components/registry.components.d.ts +1 -1
- package/dist/features/customId/customid.types.d.ts +1 -1
- package/dist/features/customId/methods.customid.d.ts +1 -1
- package/dist/features/events/events.types.d.ts +1 -1
- package/dist/features/events/presets/clientReady.d.ts +1 -1
- package/dist/features/events/presets/interactionCreate.d.ts +1 -1
- package/dist/features/events/registry.events.d.ts +1 -1
- package/dist/features/modules/modules.types.d.ts +1 -1
- package/dist/features/modules/registry.modules.d.ts +1 -1
- package/dist/features/permissions/methods.permissions.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/{commands.types-lx3T1lsC.d.ts → modules.types-BY9Ncpz7.d.ts} +36 -36
- package/dist/shared/registries.d.ts +1 -1
- package/dist/shared/typings.d.ts +1 -1
- package/dist/utility/errors.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as ContextCommandData, S as SlashCommandData, i as SlashSubcommandData, j as SlashSubcommandGroupData } from '../../
|
|
1
|
+
import { h as ContextCommandData, S as SlashCommandData, i as SlashSubcommandData, j as SlashSubcommandGroupData } from '../../modules.types-BY9Ncpz7.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/commands/builders.commands.ts"],"names":[],"mappings":";;AAQO,SAAS,mBACf,IAAA,EACmB;AACnB,EAAA,OAAO;AAAA,IACN,GAAG,IAAA;AAAA,IACH,OAAA,EAAS,cAAA;AAAA,IACT,aAAa,sBAAA,CAAuB;AAAA,GACrC;AACD;AAEO,SAAS,iBACf,IAAA,EACsB;AACtB,EAAA,OAAO;AAAA,IACN,GAAG,IAAA;AAAA,IACH,OAAA,EAAS,iBAAA;AAAA,IACT,aAAa,sBAAA,CAAuB;AAAA,GACrC;AACD;AAEO,SAAS,sBACf,IAAA,EAC2B;AAC3B,EAAA,OAAO;AAAA,IACN,GAAG,IAAA;AAAA,IACH,OAAA,EAAS,sBAAA;AAAA,IACT,WAAA,EAAa,IAAI,UAAA;AAAW,GAC7B;AACD;AAEO,SAAS,8BACf,IAAA,EACgC;AAChC,EAAA,OAAO;AAAA,IACN,GAAG,IAAA;AAAA,IACH,aAAa,sBAAA,CAAuB;AAAA,GACrC;AACD;AAEO,SAAS,2BACf,IAAA,EAC6B;AAC7B,EAAA,OAAO;AAAA,IACN,GAAG,IAAA;AAAA,IACH,aAAa,sBAAA,CAAuB;AAAA,GACrC;AACD","file":"builders.commands.js","sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../src/features/commands/builders.commands.ts"],"names":[],"mappings":";;AAQO,SAAS,mBACf,IAAA,EACmB;AACnB,EAAA,OAAO;AAAA,IACN,GAAG,IAAA;AAAA,IACH,OAAA,EAAS,cAAA;AAAA,IACT,aAAa,sBAAA,CAAuB;AAAA,GACrC;AACD;AAEO,SAAS,iBACf,IAAA,EACsB;AACtB,EAAA,OAAO;AAAA,IACN,GAAG,IAAA;AAAA,IACH,OAAA,EAAS,iBAAA;AAAA,IACT,aAAa,sBAAA,CAAuB;AAAA,GACrC;AACD;AAEO,SAAS,sBACf,IAAA,EAC2B;AAC3B,EAAA,OAAO;AAAA,IACN,GAAG,IAAA;AAAA,IACH,OAAA,EAAS,sBAAA;AAAA,IACT,WAAA,EAAa,IAAI,UAAA;AAAW,GAC7B;AACD;AAEO,SAAS,8BACf,IAAA,EACgC;AAChC,EAAA,OAAO;AAAA,IACN,GAAG,IAAA;AAAA,IACH,aAAa,sBAAA,CAAuB;AAAA,GACrC;AACD;AAEO,SAAS,2BACf,IAAA,EAC6B;AAC7B,EAAA,OAAO;AAAA,IACN,GAAG,IAAA;AAAA,IACH,aAAa,sBAAA,CAAuB;AAAA,GACrC;AACD","file":"builders.commands.js","sourcesContent":["import {\n\tContextCommandData,\n\tSlashCommandData,\n\tSlashSubcommandData,\n\tSlashSubcommandGroupData,\n} from \"#typings\";\nimport { ApplicationCommandType, Collection } from \"discord.js\";\n\nexport function createSlashCommand(\n\tdata: Omit<SlashCommandData, \"context\" | \"commandType\" | \"subcommands\" | \"subcommandGroups\">\n): SlashCommandData {\n\treturn {\n\t\t...data,\n\t\tcontext: \"SlashCommand\",\n\t\tcommandType: ApplicationCommandType.ChatInput,\n\t} satisfies SlashCommandData;\n}\n\nexport function createSubcommand(\n\tdata: Omit<SlashSubcommandData, \"context\" | \"commandType\" | \"parent\">\n): SlashSubcommandData {\n\treturn {\n\t\t...data,\n\t\tcontext: \"SlashSubcommand\",\n\t\tcommandType: ApplicationCommandType.ChatInput,\n\t} satisfies SlashSubcommandData;\n}\n\nexport function createSubcommandGroup(\n\tdata: Omit<SlashSubcommandGroupData, \"context\" | \"parent\" | \"subcommands\">\n): SlashSubcommandGroupData {\n\treturn {\n\t\t...data,\n\t\tcontext: \"SlashSubcommandGroup\",\n\t\tsubcommands: new Collection(),\n\t} satisfies SlashSubcommandGroupData;\n}\n\nexport function createMessageComponentCommand(\n\tdata: Omit<ContextCommandData<\"Message\">, \"commandType\">\n): ContextCommandData<\"Message\"> {\n\treturn {\n\t\t...data,\n\t\tcommandType: ApplicationCommandType.Message,\n\t} satisfies ContextCommandData<\"Message\">;\n}\n\nexport function createUserComponentCommand(\n\tdata: Omit<ContextCommandData<\"User\">, \"commandType\">\n): ContextCommandData<\"User\"> {\n\treturn {\n\t\t...data,\n\t\tcommandType: ApplicationCommandType.User,\n\t} satisfies ContextCommandData<\"User\">;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { B as BaseChatInputCommandData, a as BaseCommandData, C as ChatInputCommandContext, b as CommandFlags, c as CommandFunction, h as ContextCommandData, S as SlashCommandData, i as SlashSubcommandData, j as SlashSubcommandGroupData } from '../../
|
|
2
|
+
export { B as BaseChatInputCommandData, a as BaseCommandData, C as ChatInputCommandContext, b as CommandFlags, c as CommandFunction, h as ContextCommandData, S as SlashCommandData, i as SlashSubcommandData, j as SlashSubcommandGroupData } from '../../modules.types-BY9Ncpz7.js';
|
|
3
3
|
import '../permissions/permissions.types.js';
|
|
4
4
|
import '../client/client.types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as discord_js from 'discord.js';
|
|
2
2
|
import { ChatInputCommandInteraction, Interaction, CacheType, InteractionReplyOptions, InteractionEditReplyOptions, MessagePayload } from 'discord.js';
|
|
3
|
-
import { T as TriviousClient, S as SlashCommandData, b as CommandFlags } from '../../
|
|
3
|
+
import { T as TriviousClient, S as SlashCommandData, b as CommandFlags } from '../../modules.types-BY9Ncpz7.js';
|
|
4
4
|
import '../client/client.types.js';
|
|
5
5
|
import '../permissions/permissions.types.js';
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { d as Component, e as ComponentContext, f as ComponentFlags, g as ComponentInteraction } from '../../
|
|
2
|
+
export { d as Component, e as ComponentContext, f as ComponentFlags, g as ComponentInteraction } from '../../modules.types-BY9Ncpz7.js';
|
|
3
3
|
import '../permissions/permissions.types.js';
|
|
4
4
|
import '../client/client.types.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentCustomId } from './customid.types.js';
|
|
2
2
|
import '../client/client.types.js';
|
|
3
3
|
import 'discord.js';
|
|
4
|
-
import '../../
|
|
4
|
+
import '../../modules.types-BY9Ncpz7.js';
|
|
5
5
|
import '../permissions/permissions.types.js';
|
|
6
6
|
|
|
7
7
|
declare const customId: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as discord_js from 'discord.js';
|
|
2
|
-
import { T as TriviousClient } from '../../../
|
|
2
|
+
import { T as TriviousClient } from '../../../modules.types-BY9Ncpz7.js';
|
|
3
3
|
import '../../client/client.types.js';
|
|
4
4
|
import '../../permissions/permissions.types.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GuildMember, User } from 'discord.js';
|
|
2
|
-
import { T as TriviousClient, a as BaseCommandData, d as Component } from '../../
|
|
2
|
+
import { T as TriviousClient, a as BaseCommandData, d as Component } from '../../modules.types-BY9Ncpz7.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import './permissions.types.js';
|
|
5
5
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { createActionRow, createEmbed } from './features/builders/utility.builders.js';
|
|
2
2
|
export { createMessageComponentCommand, createSlashCommand, createSubcommand, createSubcommandGroup, createUserComponentCommand } from './features/commands/builders.commands.js';
|
|
3
3
|
export { handleSlashCommand, interactionReply } from './features/commands/methods.commands.js';
|
|
4
|
+
export { default as customId } from './features/customId/methods.customid.js';
|
|
4
5
|
export { CommandHashConfiguration, FeatureBasedStructure, TriviousClientCredentials, TriviousClientOptions, TriviousStructure, TypeBasedStructure } from './features/client/client.types.js';
|
|
5
|
-
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 './
|
|
6
|
+
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-BY9Ncpz7.js';
|
|
6
7
|
export { ComponentCustomId, ComponentTag } from './features/customId/customid.types.js';
|
|
7
8
|
export { CommandPermissionValues } from './features/permissions/permissions.types.js';
|
|
8
9
|
import 'discord.js';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './features/builders/utility.builders.js';
|
|
2
2
|
export * from './features/commands/builders.commands.js';
|
|
3
3
|
export * from './features/commands/methods.commands.js';
|
|
4
|
-
export
|
|
4
|
+
export { default as customId } from './features/customId/methods.customid.js';
|
|
5
5
|
export * from './shared/typings.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Client, Collection,
|
|
1
|
+
import { Client, Collection, ApplicationCommandType, Interaction, SlashCommandBuilder, SlashCommandOptionsOnlyBuilder, SlashCommandSubcommandsOnlyBuilder, SlashCommandSubcommandBuilder, ChatInputCommandInteraction, SlashCommandSubcommandGroupBuilder, ContextMenuCommandBuilder, MessageContextMenuCommandInteraction, UserContextMenuCommandInteraction, AnySelectMenuInteraction, ButtonInteraction, ModalSubmitInteraction, ClientEvents } from 'discord.js';
|
|
2
2
|
import { TriviousClientOptions } from './features/client/client.types.js';
|
|
3
3
|
import { CommandPermissionValues } from './features/permissions/permissions.types.js';
|
|
4
4
|
|
|
@@ -24,41 +24,6 @@ declare class TriviousClient extends Client {
|
|
|
24
24
|
deploy(): Promise<void>;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
type ComponentFlags = "Cached" | "DeferReply" | "EphemeralReply" | "ExpectModal";
|
|
28
|
-
type ComponentInteraction = AnySelectMenuInteraction | ButtonInteraction | ModalSubmitInteraction;
|
|
29
|
-
declare enum ComponentContext {
|
|
30
|
-
Button = 0,
|
|
31
|
-
SelectMenu = 1,
|
|
32
|
-
Modal = 2
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Trivious component
|
|
36
|
-
* @param component The component type
|
|
37
|
-
* @param identifier The unique identifier inside the custom id
|
|
38
|
-
* @param flags The component flags
|
|
39
|
-
* @param execute Component handler
|
|
40
|
-
*/
|
|
41
|
-
interface Component {
|
|
42
|
-
component: ComponentContext;
|
|
43
|
-
identifier: string;
|
|
44
|
-
flags?: ComponentFlags[];
|
|
45
|
-
permissions?: CommandPermissionValues;
|
|
46
|
-
execute: (client: TriviousClient, interaction: ComponentInteraction) => Promise<void>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
interface Event<K extends keyof ClientEvents = keyof ClientEvents> {
|
|
50
|
-
name: K;
|
|
51
|
-
once?: boolean;
|
|
52
|
-
execute: (client: TriviousClient, ...args: ClientEvents[K]) => Promise<void> | void;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
interface Module {
|
|
56
|
-
name: string;
|
|
57
|
-
events: {
|
|
58
|
-
[K in keyof ClientEvents]?: (client: TriviousClient, ...args: ClientEvents[K]) => Promise<void>;
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
27
|
type ChatInputCommandContext = "SlashCommand" | "SlashSubcommand" | "SlashSubcommandGroup";
|
|
63
28
|
type CommandFlags = "Cached" | "DeferReply" | "EphemeralReply" | "ExpectModal";
|
|
64
29
|
type CommandFunction<T extends Interaction> = (client: TriviousClient, interaction: T) => Promise<void>;
|
|
@@ -139,4 +104,39 @@ interface SlashSubcommandData<Parent extends "command" | "group" = "command", Pr
|
|
|
139
104
|
parent?: Processed extends true ? Parent extends "command" ? SlashCommandData : SlashSubcommandGroupData<true> : Parent extends "command" ? SlashCommandData | undefined : SlashSubcommandGroupData<false> | undefined;
|
|
140
105
|
}
|
|
141
106
|
|
|
107
|
+
type ComponentFlags = "Cached" | "DeferReply" | "EphemeralReply" | "ExpectModal";
|
|
108
|
+
type ComponentInteraction = AnySelectMenuInteraction | ButtonInteraction | ModalSubmitInteraction;
|
|
109
|
+
declare enum ComponentContext {
|
|
110
|
+
Button = 0,
|
|
111
|
+
SelectMenu = 1,
|
|
112
|
+
Modal = 2
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Trivious component
|
|
116
|
+
* @param component The component type
|
|
117
|
+
* @param identifier The unique identifier inside the custom id
|
|
118
|
+
* @param flags The component flags
|
|
119
|
+
* @param execute Component handler
|
|
120
|
+
*/
|
|
121
|
+
interface Component {
|
|
122
|
+
component: ComponentContext;
|
|
123
|
+
identifier: string;
|
|
124
|
+
flags?: ComponentFlags[];
|
|
125
|
+
permissions?: CommandPermissionValues;
|
|
126
|
+
execute: (client: TriviousClient, interaction: ComponentInteraction) => Promise<void>;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
interface Event<K extends keyof ClientEvents = keyof ClientEvents> {
|
|
130
|
+
name: K;
|
|
131
|
+
once?: boolean;
|
|
132
|
+
execute: (client: TriviousClient, ...args: ClientEvents[K]) => Promise<void> | void;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
interface Module {
|
|
136
|
+
name: string;
|
|
137
|
+
events: {
|
|
138
|
+
[K in keyof ClientEvents]?: (client: TriviousClient, ...args: ClientEvents[K]) => Promise<void>;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
142
|
export { type BaseChatInputCommandData as B, type ChatInputCommandContext as C, type Event as E, type Module as M, type SlashCommandData as S, TriviousClient as T, type BaseCommandData as a, type CommandFlags as b, type CommandFunction as c, type Component as d, ComponentContext as e, type ComponentFlags as f, type ComponentInteraction as g, type ContextCommandData as h, type SlashSubcommandData as i, type SlashSubcommandGroupData as j };
|
|
@@ -2,7 +2,7 @@ import registerCommands from '../features/commands/registry.commands.js';
|
|
|
2
2
|
import registerComponents from '../features/components/registry.components.js';
|
|
3
3
|
import registerEvents, { bindEvents } from '../features/events/registry.events.js';
|
|
4
4
|
import registerModules, { bindModules } from '../features/modules/registry.modules.js';
|
|
5
|
-
import '../
|
|
5
|
+
import '../modules.types-BY9Ncpz7.js';
|
|
6
6
|
import 'discord.js';
|
|
7
7
|
import '../features/client/client.types.js';
|
|
8
8
|
import '../features/permissions/permissions.types.js';
|
package/dist/shared/typings.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CommandHashConfiguration, FeatureBasedStructure, TriviousClientCredentials, TriviousClientOptions, TriviousStructure, TypeBasedStructure } from '../features/client/client.types.js';
|
|
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 '../
|
|
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-BY9Ncpz7.js';
|
|
3
3
|
export { ComponentCustomId, ComponentTag } from '../features/customId/customid.types.js';
|
|
4
4
|
export { CommandPermissionValues } from '../features/permissions/permissions.types.js';
|
|
5
5
|
import 'discord.js';
|
package/dist/utility/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as BaseCommandData, S as SlashCommandData } from '../
|
|
1
|
+
import { a as BaseCommandData, S as SlashCommandData } from '../modules.types-BY9Ncpz7.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../features/client/client.types.js';
|
|
4
4
|
import '../features/permissions/permissions.types.js';
|