trivious 1.6.4 → 1.6.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.
@@ -1,4 +1,4 @@
1
- export { T as default } from '../../index-C2iWCQmv.js';
1
+ export { T as default } from '../../index-8sXvIzqQ.js';
2
2
  import 'discord.js';
3
3
  import '../../shared/typings/permissions.js';
4
4
  import '../../shared/typings/client.js';
@@ -1,44 +1,6 @@
1
- import { MessagePayload, InteractionEditReplyOptions, InteractionReplyOptions } from 'discord.js';
2
- import { C as Command, a as ChatInputCommandInteraction, b as ContextMenuCommandInteraction, T as TriviousClient, S as SlashCommand } from '../../index-C2iWCQmv.js';
3
- import { PermissionLevel } from '../../shared/typings/permissions.js';
1
+ import 'discord.js';
2
+ export { o as commandReply, p as handleSlashCommand, v as verifyGuildPermission } from '../../index-8sXvIzqQ.js';
3
+ import '../../shared/typings/permissions.js';
4
4
  import '../../shared/typings/registry.js';
5
5
  import '../../shared/typings/client.js';
6
6
  import '../builders/util.builders.js';
7
-
8
- /**
9
- * Reply to a command, respecting whether it has been deferred or already replied to.
10
- *
11
- * @export
12
- * @async
13
- * @param {Command} command
14
- * @param {ChatInputCommandInteraction | ContextMenuCommandInteraction} interaction
15
- * @param {(MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions)} options
16
- * @returns {*}
17
- */
18
- declare function commandReply(command: Command, interaction: ChatInputCommandInteraction | ContextMenuCommandInteraction, options: MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions): Promise<void>;
19
- /**
20
- * Compare a permission level to the guild member's permission level.
21
- *
22
- * @export
23
- * @async
24
- * @param {TriviousClient} client
25
- * @param {ChatInputCommandInteraction | ContextMenuCommandInteraction} interaction
26
- * @param {Command} command
27
- * @param {PermissionLevel} requiredPermission
28
- * @param {boolean} [doReply=true]
29
- * @returns {unknown}
30
- */
31
- declare function verifyGuildPermission(client: TriviousClient, interaction: ChatInputCommandInteraction | ContextMenuCommandInteraction, command: Command, requiredPermission: PermissionLevel, doReply?: boolean): Promise<boolean>;
32
- /**
33
- * Handle execution of a slash command.
34
- *
35
- * @export
36
- * @async
37
- * @param {TriviousClient} client
38
- * @param {(SlashCommand | SlashSubcommand)} command
39
- * @param {ChatInputCommandInteraction} interaction
40
- * @returns {*}
41
- */
42
- declare function handleSlashCommand(client: TriviousClient, command: SlashCommand, interaction: ChatInputCommandInteraction): Promise<void>;
43
-
44
- export { commandReply, handleSlashCommand, verifyGuildPermission };
@@ -1,5 +1,5 @@
1
1
  import * as discord_js from 'discord.js';
2
- import { T as TriviousClient } from '../../index-C2iWCQmv.js';
2
+ import { T as TriviousClient } from '../../index-8sXvIzqQ.js';
3
3
  import '../../shared/typings/permissions.js';
4
4
  import '../../shared/typings/registry.js';
5
5
  import '../../shared/typings/client.js';
@@ -1,6 +1,6 @@
1
1
  import * as discord_js from 'discord.js';
2
2
  import { CacheType } from 'discord.js';
3
- import { T as TriviousClient } from '../../index-C2iWCQmv.js';
3
+ import { T as TriviousClient } from '../../index-8sXvIzqQ.js';
4
4
  import '../../shared/typings/permissions.js';
5
5
  import '../../shared/typings/registry.js';
6
6
  import '../../shared/typings/client.js';
@@ -1,6 +1,6 @@
1
1
  import 'discord.js';
2
2
  import '../../shared/typings/registry.js';
3
- export { c as default } from '../../index-C2iWCQmv.js';
3
+ export { C as default } from '../../index-8sXvIzqQ.js';
4
4
  import '../../shared/typings/permissions.js';
5
5
  import '../../shared/typings/client.js';
6
6
  import '../builders/util.builders.js';
@@ -1,6 +1,6 @@
1
1
  import 'discord.js';
2
2
  import '../../shared/typings/registry.js';
3
- export { d as default } from '../../index-C2iWCQmv.js';
3
+ export { a as default } from '../../index-8sXvIzqQ.js';
4
4
  import '../../shared/typings/permissions.js';
5
5
  import '../../shared/typings/client.js';
6
6
  import '../builders/util.builders.js';
@@ -1,6 +1,6 @@
1
1
  import 'discord.js';
2
2
  import '../../shared/typings/registry.js';
3
- export { E as default } from '../../index-C2iWCQmv.js';
3
+ export { E as default } from '../../index-8sXvIzqQ.js';
4
4
  import '../../shared/typings/permissions.js';
5
5
  import '../../shared/typings/client.js';
6
6
  import '../builders/util.builders.js';
@@ -1,5 +1,5 @@
1
1
  import { TriviousClientOptions } from '../../shared/typings/client.js';
2
- import { c as CommandRegistry, d as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, T as TriviousClient } from '../../index-C2iWCQmv.js';
2
+ import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, T as TriviousClient } from '../../index-8sXvIzqQ.js';
3
3
  import 'discord.js';
4
4
  import '../../shared/typings/permissions.js';
5
5
  import '../../shared/typings/registry.js';
@@ -1,6 +1,6 @@
1
1
  import 'discord.js';
2
2
  import '../../shared/typings/registry.js';
3
- export { M as default } from '../../index-C2iWCQmv.js';
3
+ export { M as default } from '../../index-8sXvIzqQ.js';
4
4
  import '../../shared/typings/permissions.js';
5
5
  import '../../shared/typings/client.js';
6
6
  import '../builders/util.builders.js';
@@ -1,7 +1,7 @@
1
1
  import { PermissionLevel } from './shared/typings/permissions.js';
2
2
  import { BaseRegistry } from './shared/typings/registry.js';
3
3
  import { TriviousClientOptions } from './shared/typings/client.js';
4
- import { AnySelectMenuInteraction, CacheType, ButtonInteraction as ButtonInteraction$1, ModalSubmitInteraction as ModalSubmitInteraction$1, SlashCommandBuilder, Collection, SlashCommandSubcommandBuilder, ContextMenuCommandBuilder, MessageContextMenuCommandInteraction, UserContextMenuCommandInteraction, ClientEvents, Client, ChatInputCommandInteraction as ChatInputCommandInteraction$1, StringSelectMenuInteraction as StringSelectMenuInteraction$1, ContextMenuCommandInteraction as ContextMenuCommandInteraction$1 } from 'discord.js';
4
+ import { AnySelectMenuInteraction, CacheType, ButtonInteraction as ButtonInteraction$1, ModalSubmitInteraction as ModalSubmitInteraction$1, SlashCommandBuilder, Collection, SlashCommandSubcommandBuilder, ContextMenuCommandBuilder, MessageContextMenuCommandInteraction, UserContextMenuCommandInteraction, ClientEvents, Client, MessagePayload, InteractionEditReplyOptions, InteractionReplyOptions, ChatInputCommandInteraction as ChatInputCommandInteraction$1, StringSelectMenuInteraction as StringSelectMenuInteraction$1, ContextMenuCommandInteraction as ContextMenuCommandInteraction$1 } from 'discord.js';
5
5
  import './core/builders/util.builders.js';
6
6
 
7
7
  /**
@@ -367,10 +367,46 @@ declare class TriviousClient extends Client {
367
367
  get rolePermissions(): Record<string, PermissionLevel>;
368
368
  }
369
369
 
370
+ /**
371
+ * Reply to a command, respecting whether it has been deferred or already replied to.
372
+ *
373
+ * @export
374
+ * @async
375
+ * @param {Command} command
376
+ * @param {ChatInputCommandInteraction | ContextMenuCommandInteraction} interaction
377
+ * @param {(MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions)} options
378
+ * @returns {*}
379
+ */
380
+ declare function commandReply(command: Command, interaction: ChatInputCommandInteraction | ContextMenuCommandInteraction, options: MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions): Promise<void>;
381
+ /**
382
+ * Compare a permission level to the guild member's permission level.
383
+ *
384
+ * @export
385
+ * @async
386
+ * @param {TriviousClient} client
387
+ * @param {ChatInputCommandInteraction | ContextMenuCommandInteraction} interaction
388
+ * @param {Command} command
389
+ * @param {PermissionLevel} requiredPermission
390
+ * @param {boolean} [doReply=true]
391
+ * @returns {unknown}
392
+ */
393
+ declare function verifyGuildPermission(client: TriviousClient, interaction: ChatInputCommandInteraction | ContextMenuCommandInteraction, command: Command, requiredPermission: PermissionLevel, doReply?: boolean): Promise<boolean>;
394
+ /**
395
+ * Handle execution of a slash command.
396
+ *
397
+ * @export
398
+ * @async
399
+ * @param {TriviousClient} client
400
+ * @param {(SlashCommand | SlashSubcommand)} command
401
+ * @param {ChatInputCommandInteraction} interaction
402
+ * @returns {*}
403
+ */
404
+ declare function handleSlashCommand(client: TriviousClient, command: SlashCommand, interaction: ChatInputCommandInteraction): Promise<void>;
405
+
370
406
  type ChatInputCommandInteraction = ChatInputCommandInteraction$1<CacheType>;
371
407
  type ButtonInteraction = ButtonInteraction$1<CacheType>;
372
408
  type StringSelectMenuInteraction = StringSelectMenuInteraction$1<CacheType>;
373
409
  type ModalSubmitInteraction = ModalSubmitInteraction$1<CacheType>;
374
410
  type ContextMenuCommandInteraction = ContextMenuCommandInteraction$1<CacheType>;
375
411
 
376
- export { type ButtonInteraction as B, type Command as C, EventRegistry as E, ModuleRegistry as M, type SlashCommand as S, TriviousClient as T, type ChatInputCommandInteraction as a, type ContextMenuCommandInteraction as b, CommandRegistry as c, ComponentRegistry as d, type CustomIdConstructOptions as e, type Component as f, type ComponentCustomIdTag as g, type ComponentInteraction as h, ComponentType as i, type SlashSubcommand as j, type ContextMenuCommand as k, type CommandInteraction as l, type CommandFlags as m, type CommandContext as n, type Event as o, type Module as p, type StringSelectMenuInteraction as q, type ModalSubmitInteraction as r };
412
+ export { type ButtonInteraction as B, CommandRegistry as C, EventRegistry as E, ModuleRegistry as M, type SlashCommand as S, TriviousClient as T, ComponentRegistry as a, type CustomIdConstructOptions as b, type Component as c, type ComponentCustomIdTag as d, type ComponentInteraction as e, ComponentType as f, type Command as g, type SlashSubcommand as h, type ContextMenuCommand as i, type CommandInteraction as j, type CommandFlags as k, type CommandContext as l, type Event as m, type Module as n, commandReply as o, handleSlashCommand as p, type ChatInputCommandInteraction as q, type StringSelectMenuInteraction as r, type ModalSubmitInteraction as s, type ContextMenuCommandInteraction as t, verifyGuildPermission as v };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import 'discord.js';
2
- export { B as ButtonInteraction, a as ChatInputCommandInteraction, C as Command, n as CommandContext, m as CommandFlags, l as CommandInteraction, c as CommandRegistry, f as Component, g as ComponentCustomIdTag, h as ComponentInteraction, d as ComponentRegistry, i as ComponentType, k as ContextMenuCommand, b as ContextMenuCommandInteraction, e as CustomIdConstructOptions, o as Event, r as ModalSubmitInteraction, p as Module, S as SlashCommand, j as SlashSubcommand, q as StringSelectMenuInteraction, T as TriviousClient } from './index-C2iWCQmv.js';
2
+ export { B as ButtonInteraction, q as ChatInputCommandInteraction, g as Command, l as CommandContext, k as CommandFlags, j as CommandInteraction, C as CommandRegistry, c as Component, d as ComponentCustomIdTag, e as ComponentInteraction, a as ComponentRegistry, f as ComponentType, i as ContextMenuCommand, t as ContextMenuCommandInteraction, b as CustomIdConstructOptions, m as Event, s as ModalSubmitInteraction, n as Module, S as SlashCommand, h as SlashSubcommand, r as StringSelectMenuInteraction, T as TriviousClient, o as commandReply, p as handleSlashCommand, v as verifyGuildPermission } from './index-8sXvIzqQ.js';
3
3
  export { createActionRow, createEmbed } from './core/builders/util.builders.js';
4
4
  export { PermissionLevel } from './shared/typings/permissions.js';
5
5
  export { BaseRegistry } from './shared/typings/registry.js';
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ import 'dotenv/config';
2
2
  import 'node:util';
3
3
  export { default as TriviousClient } from './core/client/trivious.client.js';
4
4
  export { default as CommandRegistry } from './core/registry/command.registry.js';
5
+ export { commandReply, handleSlashCommand, verifyGuildPermission } from './core/commands/methods.command.js';
5
6
  export { default as ComponentRegistry } from './core/registry/component.registry.js';
6
7
  export { createActionRow, createEmbed } from './core/builders/util.builders.js';
7
8
  export * from './shared/typings/index.js';
@@ -1,6 +1,6 @@
1
1
  import './permissions.js';
2
2
  import 'discord.js';
3
- export { C as Command, n as CommandContext, m as CommandFlags, l as CommandInteraction, k as ContextMenuCommand, S as SlashCommand, j as SlashSubcommand } from '../../index-C2iWCQmv.js';
3
+ export { g as Command, l as CommandContext, k as CommandFlags, j as CommandInteraction, i as ContextMenuCommand, S as SlashCommand, h as SlashSubcommand } from '../../index-8sXvIzqQ.js';
4
4
  import './registry.js';
5
5
  import './client.js';
6
6
  import '../../core/builders/util.builders.js';
@@ -1,6 +1,6 @@
1
1
  import 'discord.js';
2
2
  import './permissions.js';
3
- export { f as Component, g as ComponentCustomIdTag, h as ComponentInteraction, i as ComponentType, e as CustomIdConstructOptions } from '../../index-C2iWCQmv.js';
3
+ export { c as Component, d as ComponentCustomIdTag, e as ComponentInteraction, f as ComponentType, b as CustomIdConstructOptions } from '../../index-8sXvIzqQ.js';
4
4
  import './registry.js';
5
5
  import './client.js';
6
6
  import '../../core/builders/util.builders.js';
@@ -1,5 +1,5 @@
1
1
  import 'discord.js';
2
- export { o as Event } from '../../index-C2iWCQmv.js';
2
+ export { m as Event } from '../../index-8sXvIzqQ.js';
3
3
  import './permissions.js';
4
4
  import './registry.js';
5
5
  import './client.js';
@@ -1,6 +1,6 @@
1
1
  export { PermissionLevel } from './permissions.js';
2
2
  export { BaseRegistry } from './registry.js';
3
- export { C as Command, n as CommandContext, m as CommandFlags, l as CommandInteraction, f as Component, g as ComponentCustomIdTag, h as ComponentInteraction, i as ComponentType, k as ContextMenuCommand, e as CustomIdConstructOptions, o as Event, p as Module, S as SlashCommand, j as SlashSubcommand } from '../../index-C2iWCQmv.js';
3
+ export { g as Command, l as CommandContext, k as CommandFlags, j as CommandInteraction, c as Component, d as ComponentCustomIdTag, e as ComponentInteraction, f as ComponentType, i as ContextMenuCommand, b as CustomIdConstructOptions, m as Event, n as Module, S as SlashCommand, h as SlashSubcommand } from '../../index-8sXvIzqQ.js';
4
4
  export { TriviousClientOptions } from './client.js';
5
5
  import 'discord.js';
6
6
  import '../../core/builders/util.builders.js';
@@ -1,5 +1,5 @@
1
1
  import 'discord.js';
2
- export { p as Module } from '../../index-C2iWCQmv.js';
2
+ export { n as Module } from '../../index-8sXvIzqQ.js';
3
3
  import './permissions.js';
4
4
  import './registry.js';
5
5
  import './client.js';
@@ -1,4 +1,4 @@
1
- import { e as CustomIdConstructOptions } from '../../index-C2iWCQmv.js';
1
+ import { b as CustomIdConstructOptions } from '../../index-8sXvIzqQ.js';
2
2
  import '../typings/permissions.js';
3
3
  import '../typings/registry.js';
4
4
  import 'discord.js';
@@ -1,4 +1,4 @@
1
- import { T as TriviousClient } from '../../index-C2iWCQmv.js';
1
+ import { T as TriviousClient } from '../../index-8sXvIzqQ.js';
2
2
  import { PermissionLevel } from '../typings/permissions.js';
3
3
  import { User, GuildMember, RESTPostAPIApplicationCommandsJSONBody } from 'discord.js';
4
4
  import '../typings/registry.js';
@@ -1,6 +1,6 @@
1
1
  import { GuildMember } from 'discord.js';
2
2
  import { PermissionLevel } from '../typings/permissions.js';
3
- import { T as TriviousClient } from '../../index-C2iWCQmv.js';
3
+ import { T as TriviousClient } from '../../index-8sXvIzqQ.js';
4
4
  import '../typings/registry.js';
5
5
  import '../typings/client.js';
6
6
  import '../../core/builders/util.builders.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trivious",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "discord-bot",