necord 5.7.3 → 5.8.0-dev.1682470893.eaae4a6

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,22 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ # [5.8.0](https://github.com/necordjs/necord/compare/v5.7.3...v5.8.0) - (2023-04-25)
5
+
6
+ ## Features
7
+
8
+ - Add methods for discovery #710 ([783bb98](https://github.com/necordjs/necord/commit/783bb986e593222b0c5d03ab980d5cc15517311a))
9
+
10
+ ## Refactor
11
+
12
+ - Rename interface ([71e6bee](https://github.com/necordjs/necord/commit/71e6beefdc4fb260a8b9b57f4a0f9d284f1be8dc))
13
+
14
+ # [5.7.3](https://github.com/necordjs/necord/compare/v5.7.2...v5.7.3) - (2023-04-17)
15
+
16
+ ## Refactor
17
+
18
+ - Export explorer and another providers ([d1d385d](https://github.com/necordjs/necord/commit/d1d385dda060da7d9d7b2963e14b401ac8a67802))
19
+
4
20
  # [5.7.1](https://github.com/necordjs/necord/compare/v5.7.0...v5.7.1) - (2023-04-13)
5
21
 
6
22
  ## Refactor
@@ -1,8 +1,11 @@
1
1
  import { BaseApplicationCommandData, Snowflake } from 'discord.js';
2
2
  import { NecordBaseDiscovery } from '../context';
3
- export declare abstract class CommandDiscovery<T extends BaseApplicationCommandData & {
3
+ export interface BaseCommandMeta extends BaseApplicationCommandData {
4
4
  guilds?: Snowflake[];
5
- } = BaseApplicationCommandData> extends NecordBaseDiscovery<T> {
5
+ }
6
+ export declare abstract class CommandDiscovery<T extends BaseCommandMeta = BaseCommandMeta> extends NecordBaseDiscovery<T> {
6
7
  getName(): string;
8
+ setGuilds(guilds: Snowflake[]): void;
9
+ hasGuild(guild: Snowflake): boolean;
7
10
  getGuilds(): Snowflake[];
8
11
  }
@@ -6,6 +6,13 @@ class CommandDiscovery extends context_1.NecordBaseDiscovery {
6
6
  getName() {
7
7
  return this.meta.name;
8
8
  }
9
+ setGuilds(guilds) {
10
+ this.meta.guilds = guilds;
11
+ }
12
+ hasGuild(guild) {
13
+ var _a;
14
+ return (_a = this.meta.guilds) === null || _a === void 0 ? void 0 : _a.includes(guild);
15
+ }
9
16
  getGuilds() {
10
17
  return this.meta.guilds;
11
18
  }
@@ -1,3 +1,4 @@
1
1
  export * from './decorators';
2
2
  export * from './listener.discovery';
3
+ export * from './listener.interface';
3
4
  export * from './listeners.service';
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./decorators"), exports);
18
18
  __exportStar(require("./listener.discovery"), exports);
19
+ __exportStar(require("./listener.interface"), exports);
19
20
  __exportStar(require("./listeners.service"), exports);
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": "5.7.3",
4
+ "version": "5.8.0-dev.1682470893.eaae4a6",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && tsc -p tsconfig.build.json",
7
7
  "prepublish:npm": "npm run build",
@@ -60,17 +60,17 @@
60
60
  "@favware/npm-deprecate": "1.0.7",
61
61
  "@nestjs/common": "9.4.0",
62
62
  "@nestjs/core": "9.4.0",
63
- "@types/node": "18.15.11",
64
- "@typescript-eslint/eslint-plugin": "5.58.0",
65
- "@typescript-eslint/parser": "5.58.0",
66
- "discord-api-types": "0.37.38",
63
+ "@types/node": "18.16.0",
64
+ "@typescript-eslint/eslint-plugin": "5.59.1",
65
+ "@typescript-eslint/parser": "5.59.1",
66
+ "discord-api-types": "0.37.40",
67
67
  "discord.js": "14.9.0",
68
- "eslint": "8.38.0",
68
+ "eslint": "8.39.0",
69
69
  "eslint-config-prettier": "8.8.0",
70
70
  "eslint-plugin-prettier": "4.2.1",
71
71
  "husky": "8.0.3",
72
72
  "lint-staged": "13.2.1",
73
- "prettier": "2.8.7",
73
+ "prettier": "2.8.8",
74
74
  "reflect-metadata": "0.1.13",
75
75
  "release-it": "15.10.1",
76
76
  "rimraf": "5.0.0",