necord 6.1.3 → 6.1.4-dev.1694047943.34f264f

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/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ # [6.1.4](https://github.com/necordjs/necord/compare/v6.1.3...v6.1.4) - (2023-09-06)
5
+
6
+ ## Features
7
+
8
+ - **slash-command-discovery:** Add getters for subcommands ([1851628](https://github.com/necordjs/necord/commit/1851628f35bdc200f6a4e80e8ed0bce239ed33ba))
9
+
10
+ # [6.1.3](https://github.com/necordjs/necord/compare/v6.1.2...v6.1.3) - (2023-09-01)
11
+
12
+ ## Bug Fixes
13
+
14
+ - Grouping subcommands and commands ([823a48e](https://github.com/necordjs/necord/commit/823a48e057043f9696704aa801b8eff55f9178de))
15
+
4
16
  # [6.1.2](https://github.com/necordjs/necord/compare/v6.1.1...v6.1.2) - (2023-08-29)
5
17
 
6
18
  ## Refactor
@@ -1,4 +1,4 @@
1
- import { ApplicationCommandOptionType, ApplicationCommandType, AutocompleteInteraction, ChatInputApplicationCommandData, ChatInputCommandInteraction, CommandInteractionOptionResolver, Snowflake } from 'discord.js';
1
+ import { ApplicationCommandOptionType, ApplicationCommandType, AutocompleteInteraction, ChatInputApplicationCommandData, ChatInputCommandInteraction, Collection, CommandInteractionOptionResolver, Snowflake } from 'discord.js';
2
2
  import { APIApplicationCommandOptionBase } from 'discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base';
3
3
  import { CommandDiscovery } from '../command.discovery';
4
4
  export interface SlashCommandMeta extends ChatInputApplicationCommandData {
@@ -13,6 +13,8 @@ export declare class SlashCommandDiscovery extends CommandDiscovery<SlashCommand
13
13
  getDescription(): string;
14
14
  setSubcommand(command: SlashCommandDiscovery): void;
15
15
  ensureSubcommand(command: SlashCommandDiscovery): SlashCommandDiscovery;
16
+ getSubcommand(name: string): SlashCommandDiscovery;
17
+ getSubcommands(): Collection<string, SlashCommandDiscovery>;
16
18
  getRawOptions(): Record<string, OptionMeta>;
17
19
  getOptions(): any;
18
20
  execute(interaction: ChatInputCommandInteraction | AutocompleteInteraction, depth?: number): any;
@@ -18,6 +18,12 @@ class SlashCommandDiscovery extends command_discovery_1.CommandDiscovery {
18
18
  ensureSubcommand(command) {
19
19
  return this.subcommands.ensure(command.getName(), () => command);
20
20
  }
21
+ getSubcommand(name) {
22
+ return this.subcommands.get(name);
23
+ }
24
+ getSubcommands() {
25
+ return this.subcommands;
26
+ }
21
27
  getRawOptions() {
22
28
  var _a;
23
29
  return (_a = this.reflector.get(options_1.OPTIONS_METADATA, this.getHandler())) !== null && _a !== void 0 ? _a : {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "necord",
3
3
  "description": "A module for creating Discord bots using NestJS, based on Discord.js",
4
- "version": "6.1.3",
4
+ "version": "6.1.4-dev.1694047943.34f264f",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && tsc -p tsconfig.build.json",
7
7
  "prepublish:npm": "npm run build",
@@ -60,9 +60,9 @@
60
60
  "@favware/npm-deprecate": "1.0.7",
61
61
  "@nestjs/common": "10.2.4",
62
62
  "@nestjs/core": "10.2.4",
63
- "@types/node": "20.5.7",
64
- "@typescript-eslint/eslint-plugin": "6.5.0",
65
- "@typescript-eslint/parser": "6.5.0",
63
+ "@types/node": "20.5.9",
64
+ "@typescript-eslint/eslint-plugin": "6.6.0",
65
+ "@typescript-eslint/parser": "6.6.0",
66
66
  "discord-api-types": "0.37.56",
67
67
  "discord.js": "14.13.0",
68
68
  "eslint": "8.48.0",