@globalart/nestcord 2.3.1 → 2.4.0
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.
|
@@ -2,6 +2,7 @@ import { NestCordBaseDiscovery } from '../context';
|
|
|
2
2
|
export interface TextCommandMeta {
|
|
3
3
|
name: string;
|
|
4
4
|
description: string;
|
|
5
|
+
aliases?: string[];
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* Represents a text command discovery.
|
|
@@ -9,6 +10,7 @@ export interface TextCommandMeta {
|
|
|
9
10
|
export declare class TextCommandDiscovery extends NestCordBaseDiscovery<TextCommandMeta> {
|
|
10
11
|
getName(): string;
|
|
11
12
|
getDescription(): string;
|
|
13
|
+
getAliases(): string[];
|
|
12
14
|
isTextCommand(): this is TextCommandDiscovery;
|
|
13
15
|
toJSON(): Record<string, any>;
|
|
14
16
|
}
|
|
@@ -12,6 +12,10 @@ class TextCommandDiscovery extends context_1.NestCordBaseDiscovery {
|
|
|
12
12
|
getDescription() {
|
|
13
13
|
return this.meta.description;
|
|
14
14
|
}
|
|
15
|
+
getAliases() {
|
|
16
|
+
var _a;
|
|
17
|
+
return (_a = this.meta.aliases) !== null && _a !== void 0 ? _a : [];
|
|
18
|
+
}
|
|
15
19
|
isTextCommand() {
|
|
16
20
|
return true;
|
|
17
21
|
}
|
|
@@ -20,10 +20,18 @@ let TextCommandsService = TextCommandsService_1 = class TextCommandsService {
|
|
|
20
20
|
}
|
|
21
21
|
add(textCommand) {
|
|
22
22
|
const name = textCommand.getName();
|
|
23
|
+
const aliases = textCommand.getAliases();
|
|
23
24
|
if (this.cache.has(name)) {
|
|
24
25
|
this.logger.warn(`TextCommand : ${name} already exists`);
|
|
25
26
|
}
|
|
26
27
|
this.cache.set(name, textCommand);
|
|
28
|
+
for (const alias of aliases) {
|
|
29
|
+
if (this.cache.has(alias)) {
|
|
30
|
+
this.logger.warn(`TextCommand alias : ${alias} already exists`);
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
this.cache.set(alias, textCommand);
|
|
34
|
+
}
|
|
27
35
|
}
|
|
28
36
|
get(name) {
|
|
29
37
|
return this.cache.get(name);
|
|
@@ -4,7 +4,7 @@ export declare class NestCordLavalinkService {
|
|
|
4
4
|
private readonly lavalinkManager;
|
|
5
5
|
private readonly client;
|
|
6
6
|
constructor(lavalinkManager: LavalinkManager, client: Client);
|
|
7
|
-
lavalinkUtils: import("lavalink-client
|
|
7
|
+
lavalinkUtils: import("lavalink-client").ManagerUtils;
|
|
8
8
|
extractInfoForPlayer(base: Message | ChatInputCommandInteraction): {
|
|
9
9
|
guildId: string;
|
|
10
10
|
voiceChannelId: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globalart/nestcord",
|
|
3
3
|
"description": "A module for creating Discord bots using NestJS, based on Discord.js",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "rimraf dist && tsc -p tsconfig.build.json",
|
|
@@ -50,35 +50,35 @@
|
|
|
50
50
|
"@nestjs/axios": "^4.0.0",
|
|
51
51
|
"@nestjs/schedule": "^6.0.0",
|
|
52
52
|
"axios": "^1.9.0",
|
|
53
|
-
"cron": "4.
|
|
53
|
+
"cron": "4.4.0",
|
|
54
54
|
"deepmerge": "^4.3.1",
|
|
55
55
|
"lavalink-client": "^2.5.3",
|
|
56
56
|
"path-to-regexp": "^8.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@commitlint/cli": "
|
|
60
|
-
"@commitlint/config-angular": "
|
|
59
|
+
"@commitlint/cli": "20.5.0",
|
|
60
|
+
"@commitlint/config-angular": "20.5.0",
|
|
61
61
|
"@favware/npm-deprecate": "2.0.0",
|
|
62
|
-
"@nestjs/common": "11.1.
|
|
63
|
-
"@nestjs/core": "11.1.
|
|
62
|
+
"@nestjs/common": "11.1.18",
|
|
63
|
+
"@nestjs/core": "11.1.18",
|
|
64
64
|
"@nestjs/platform-express": "^11.1.1",
|
|
65
|
-
"@types/node": "
|
|
66
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
67
|
-
"@typescript-eslint/parser": "8.
|
|
68
|
-
"discord-api-types": "0.38.
|
|
69
|
-
"discord.js": "14.
|
|
70
|
-
"eslint": "
|
|
71
|
-
"eslint-config-prettier": "10.1.
|
|
72
|
-
"eslint-plugin-prettier": "5.5.
|
|
65
|
+
"@types/node": "25.5.2",
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "8.58.0",
|
|
67
|
+
"@typescript-eslint/parser": "8.58.0",
|
|
68
|
+
"discord-api-types": "0.38.44",
|
|
69
|
+
"discord.js": "14.26.2",
|
|
70
|
+
"eslint": "10.2.0",
|
|
71
|
+
"eslint-config-prettier": "10.1.8",
|
|
72
|
+
"eslint-plugin-prettier": "5.5.5",
|
|
73
73
|
"husky": "9.1.7",
|
|
74
|
-
"lint-staged": "16.
|
|
75
|
-
"prettier": "3.
|
|
74
|
+
"lint-staged": "16.4.0",
|
|
75
|
+
"prettier": "3.8.1",
|
|
76
76
|
"reflect-metadata": "0.2.2",
|
|
77
|
-
"release-it": "19.
|
|
78
|
-
"rimraf": "6.
|
|
77
|
+
"release-it": "19.2.4",
|
|
78
|
+
"rimraf": "6.1.3",
|
|
79
79
|
"rxjs": "7.8.2",
|
|
80
80
|
"ts-node": "10.9.2",
|
|
81
|
-
"typescript": "5.
|
|
81
|
+
"typescript": "5.9.3"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
84
|
"@nestjs/common": ">=10.2.0",
|