trivious 2.0.1 → 2.0.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,4 +1,4 @@
1
- import { T as TriviousClient } from '../../modules.types-4hfuUiCb.js';
1
+ import { T as TriviousClient } from '../../modules.types-uNvWKT4j.js';
2
2
  import 'discord.js';
3
3
  import './client.types.js';
4
4
 
@@ -1,3 +1,3 @@
1
1
  import 'discord.js';
2
2
  import './client.types.js';
3
- export { T as default } from '../../modules.types-4hfuUiCb.js';
3
+ export { T as default } from '../../modules.types-uNvWKT4j.js';
@@ -1,3 +1,3 @@
1
1
  import 'discord.js';
2
- export { B as BaseChatInputCommandData, a as BaseCommandData, b as BaseContextCommandData, C as ChatInputCommandContext, c as ChatInputCommandFunction, d as CommandFlags, i as ContextCommandData, j as ContextMenuCommandFunction, M as MessageCommandData, S as SlashCommandData, l as SlashSubcommandData, m as SlashSubcommandGroupData, U as UserCommandData } from '../../modules.types-4hfuUiCb.js';
2
+ export { B as BaseChatInputCommandData, a as BaseCommandData, b as BaseContextCommandData, C as ChatInputCommandContext, c as CommandFlags, d as CommandFunction, i as ContextCommandData, M as MessageCommandData, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData, U as UserCommandData } from '../../modules.types-uNvWKT4j.js';
3
3
  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, d as CommandFlags } from '../../modules.types-4hfuUiCb.js';
3
+ import { T as TriviousClient, S as SlashCommandData, c as CommandFlags } from '../../modules.types-uNvWKT4j.js';
4
4
  import '../client/client.types.js';
5
5
 
6
6
  declare function interactionReply(options: {
@@ -1,4 +1,4 @@
1
- import { T as TriviousClient } from '../../modules.types-4hfuUiCb.js';
1
+ import { T as TriviousClient } from '../../modules.types-uNvWKT4j.js';
2
2
  import 'discord.js';
3
3
  import '../client/client.types.js';
4
4
 
@@ -1,3 +1,3 @@
1
1
  import 'discord.js';
2
- export { e as Component, f as ComponentContext, g as ComponentFlags, h as ComponentInteraction } from '../../modules.types-4hfuUiCb.js';
2
+ export { e as Component, f as ComponentContext, g as ComponentFlags, h as ComponentInteraction } from '../../modules.types-uNvWKT4j.js';
3
3
  import '../client/client.types.js';
@@ -1,4 +1,4 @@
1
- import { T as TriviousClient } from '../../modules.types-4hfuUiCb.js';
1
+ import { T as TriviousClient } from '../../modules.types-uNvWKT4j.js';
2
2
  import 'discord.js';
3
3
  import '../client/client.types.js';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import '../client/client.types.js';
2
- import { f as ComponentContext } from '../../modules.types-4hfuUiCb.js';
2
+ import { f as ComponentContext } from '../../modules.types-uNvWKT4j.js';
3
3
  import 'discord.js';
4
4
 
5
5
  type ComponentTag = "awaited";
@@ -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 '../../modules.types-4hfuUiCb.js';
4
+ import '../../modules.types-uNvWKT4j.js';
5
5
 
6
6
  /**
7
7
  * Decode a customId into its parts
@@ -1,3 +1,3 @@
1
1
  import 'discord.js';
2
- export { E as Event } from '../../modules.types-4hfuUiCb.js';
2
+ export { E as Event } from '../../modules.types-uNvWKT4j.js';
3
3
  import '../client/client.types.js';
@@ -1,4 +1,4 @@
1
- import { T as TriviousClient } from '../../../modules.types-4hfuUiCb.js';
1
+ import { T as TriviousClient } from '../../../modules.types-uNvWKT4j.js';
2
2
  import 'discord.js';
3
3
  import '../../client/client.types.js';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import * as discord_js from 'discord.js';
2
- import { T as TriviousClient } from '../../../modules.types-4hfuUiCb.js';
2
+ import { T as TriviousClient } from '../../../modules.types-uNvWKT4j.js';
3
3
  import '../../client/client.types.js';
4
4
 
5
5
  declare const _default: {
@@ -1,4 +1,4 @@
1
- import { T as TriviousClient } from '../../modules.types-4hfuUiCb.js';
1
+ import { T as TriviousClient } from '../../modules.types-uNvWKT4j.js';
2
2
  import 'discord.js';
3
3
  import '../client/client.types.js';
4
4
 
@@ -1,3 +1,3 @@
1
1
  import 'discord.js';
2
- export { k as Module } from '../../modules.types-4hfuUiCb.js';
2
+ export { j as Module } from '../../modules.types-uNvWKT4j.js';
3
3
  import '../client/client.types.js';
@@ -1,4 +1,4 @@
1
- import { T as TriviousClient } from '../../modules.types-4hfuUiCb.js';
1
+ import { T as TriviousClient } from '../../modules.types-uNvWKT4j.js';
2
2
  import 'discord.js';
3
3
  import '../client/client.types.js';
4
4
 
package/dist/index.d.ts CHANGED
@@ -2,6 +2,6 @@ export { createActionRow, createEmbed } from './features/builders/utility.builde
2
2
  export { handleSlashCommand, interactionReply } from './features/commands/methods.commands.js';
3
3
  export { decodeCustomId, encodeCustomId } from './features/customId/methods.customid.js';
4
4
  export { CommandHashConfiguration, FeatureBasedStructure, TriviousClientCredentials, TriviousClientOptions, TriviousStructure, TypeBasedStructure } from './features/client/client.types.js';
5
- export { B as BaseChatInputCommandData, a as BaseCommandData, b as BaseContextCommandData, C as ChatInputCommandContext, c as ChatInputCommandFunction, d as CommandFlags, e as Component, f as ComponentContext, g as ComponentFlags, h as ComponentInteraction, i as ContextCommandData, j as ContextMenuCommandFunction, E as Event, M as MessageCommandData, k as Module, S as SlashCommandData, l as SlashSubcommandData, m as SlashSubcommandGroupData, T as TriviousClient, U as UserCommandData } from './modules.types-4hfuUiCb.js';
5
+ export { B as BaseChatInputCommandData, a as BaseCommandData, b as BaseContextCommandData, C as ChatInputCommandContext, c as CommandFlags, d as CommandFunction, e as Component, f as ComponentContext, g as ComponentFlags, h as ComponentInteraction, i as ContextCommandData, E as Event, M as MessageCommandData, j as Module, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData, T as TriviousClient, U as UserCommandData } from './modules.types-uNvWKT4j.js';
6
6
  export { ComponentCustomId, ComponentTag } from './features/customId/customid.types.js';
7
7
  import 'discord.js';
@@ -1,4 +1,4 @@
1
- import { Client, Collection, ApplicationCommandType, SlashCommandBuilder, SlashCommandOptionsOnlyBuilder, SlashCommandSubcommandsOnlyBuilder, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, ChatInputCommandInteraction, ContextMenuCommandBuilder, ContextMenuCommandInteraction, MessageContextMenuCommandInteraction, UserContextMenuCommandInteraction, AnySelectMenuInteraction, ButtonInteraction, ModalSubmitInteraction, ClientEvents } from 'discord.js';
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
 
4
4
  declare class TriviousClient extends Client {
@@ -25,8 +25,7 @@ declare class TriviousClient extends Client {
25
25
 
26
26
  type ChatInputCommandContext = "SlashCommand" | "SlashSubcommand" | "SlashSubcommandGroup";
27
27
  type CommandFlags = "Cached" | "DeferReply" | "EphemeralReply" | "ExpectModal";
28
- type ChatInputCommandFunction = (client: TriviousClient, interaction: ChatInputCommandInteraction) => Promise<void>;
29
- type ContextMenuCommandFunction<T extends ContextMenuCommandInteraction> = (client: TriviousClient, interaction: T) => Promise<void>;
28
+ type CommandFunction<T extends Interaction> = (client: TriviousClient, interaction: T) => Promise<void>;
30
29
  /**
31
30
  * Base Trivious command data
32
31
  *
@@ -72,7 +71,7 @@ interface SlashCommandData extends BaseChatInputCommandData {
72
71
  data: SlashCommandBuilder | SlashCommandOptionsOnlyBuilder | SlashCommandSubcommandsOnlyBuilder;
73
72
  subcommands?: Collection<string, SlashSubcommandData<true, "command">>;
74
73
  subcommandGroups?: Collection<string, SlashSubcommandGroupData<true>>;
75
- run?: ChatInputCommandFunction;
74
+ run?: CommandFunction<ChatInputCommandInteraction>;
76
75
  }
77
76
  /**
78
77
  * Trivious slash subcommand group data
@@ -97,7 +96,7 @@ interface SlashSubcommandGroupData<Processed extends boolean = false> {
97
96
  interface SlashSubcommandData<Processed extends boolean = false, Parent extends "command" | "group" = "command"> extends BaseChatInputCommandData {
98
97
  context: "SlashSubcommand";
99
98
  data: SlashCommandSubcommandBuilder;
100
- execute: ChatInputCommandFunction;
99
+ execute: CommandFunction<ChatInputCommandInteraction>;
101
100
  parent?: Processed extends true ? Parent extends "command" ? SlashCommandData : SlashSubcommandGroupData<true> : Parent extends "command" ? SlashCommandData | undefined : SlashSubcommandGroupData<false> | undefined;
102
101
  }
103
102
  /**
@@ -111,7 +110,7 @@ interface SlashSubcommandData<Processed extends boolean = false, Parent extends
111
110
  interface MessageCommandData extends BaseContextCommandData {
112
111
  commandType: ApplicationCommandType.Message;
113
112
  data: ContextMenuCommandBuilder;
114
- execute: ContextMenuCommandFunction<MessageContextMenuCommandInteraction>;
113
+ execute: CommandFunction<MessageContextMenuCommandInteraction>;
115
114
  }
116
115
  /**
117
116
  * Trivious user command data
@@ -124,7 +123,7 @@ interface MessageCommandData extends BaseContextCommandData {
124
123
  interface UserCommandData extends BaseContextCommandData {
125
124
  commandType: ApplicationCommandType.User;
126
125
  data: ContextMenuCommandBuilder;
127
- execute: ContextMenuCommandFunction<UserContextMenuCommandInteraction>;
126
+ execute: CommandFunction<UserContextMenuCommandInteraction>;
128
127
  }
129
128
  type ContextCommandData = MessageCommandData | UserCommandData;
130
129
 
@@ -162,4 +161,4 @@ interface Module {
162
161
  };
163
162
  }
164
163
 
165
- export { type BaseChatInputCommandData as B, type ChatInputCommandContext as C, type Event as E, type MessageCommandData as M, type SlashCommandData as S, TriviousClient as T, type UserCommandData as U, type BaseCommandData as a, type BaseContextCommandData as b, type ChatInputCommandFunction as c, type CommandFlags as d, type Component as e, ComponentContext as f, type ComponentFlags as g, type ComponentInteraction as h, type ContextCommandData as i, type ContextMenuCommandFunction as j, type Module as k, type SlashSubcommandData as l, type SlashSubcommandGroupData as m };
164
+ export { type BaseChatInputCommandData as B, type ChatInputCommandContext as C, type Event as E, type MessageCommandData as M, type SlashCommandData as S, TriviousClient as T, type UserCommandData as U, type BaseCommandData as a, type BaseContextCommandData as b, type CommandFlags as c, type CommandFunction as d, type Component as e, ComponentContext as f, type ComponentFlags as g, type ComponentInteraction as h, type ContextCommandData as i, type Module as j, type SlashSubcommandData as k, type SlashSubcommandGroupData as l };
@@ -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 '../modules.types-4hfuUiCb.js';
5
+ import '../modules.types-uNvWKT4j.js';
6
6
  import 'discord.js';
7
7
  import '../features/client/client.types.js';
8
8
 
@@ -1,4 +1,4 @@
1
1
  export { CommandHashConfiguration, FeatureBasedStructure, TriviousClientCredentials, TriviousClientOptions, TriviousStructure, TypeBasedStructure } from '../features/client/client.types.js';
2
- export { B as BaseChatInputCommandData, a as BaseCommandData, b as BaseContextCommandData, C as ChatInputCommandContext, c as ChatInputCommandFunction, d as CommandFlags, e as Component, f as ComponentContext, g as ComponentFlags, h as ComponentInteraction, i as ContextCommandData, j as ContextMenuCommandFunction, E as Event, M as MessageCommandData, k as Module, S as SlashCommandData, l as SlashSubcommandData, m as SlashSubcommandGroupData, T as TriviousClient, U as UserCommandData } from '../modules.types-4hfuUiCb.js';
2
+ export { B as BaseChatInputCommandData, a as BaseCommandData, b as BaseContextCommandData, C as ChatInputCommandContext, c as CommandFlags, d as CommandFunction, e as Component, f as ComponentContext, g as ComponentFlags, h as ComponentInteraction, i as ContextCommandData, E as Event, M as MessageCommandData, j as Module, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData, T as TriviousClient, U as UserCommandData } from '../modules.types-uNvWKT4j.js';
3
3
  export { ComponentCustomId, ComponentTag } from '../features/customId/customid.types.js';
4
4
  import 'discord.js';
@@ -1,4 +1,4 @@
1
- import { a as BaseCommandData, S as SlashCommandData } from '../modules.types-4hfuUiCb.js';
1
+ import { a as BaseCommandData, S as SlashCommandData } from '../modules.types-uNvWKT4j.js';
2
2
  import 'discord.js';
3
3
  import '../features/client/client.types.js';
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trivious",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "discord-bot",