necord 6.1.1 → 6.1.2-dev.1693311741.39d8bbd
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 +6 -0
- package/dist/commands/commands.service.js +2 -1
- package/dist/commands/context-menus/context-menus.service.js +2 -1
- package/dist/commands/context-menus/decorators/context-menu.decorator.d.ts +2 -2
- package/dist/commands/slash-commands/autocomplete/autocomplete.interceptor.js +2 -1
- package/dist/commands/slash-commands/decorators/slash-command.decorator.d.ts +2 -2
- package/dist/commands/slash-commands/decorators/subcommand-group.decorator.d.ts +2 -2
- package/dist/commands/slash-commands/decorators/subcommand.decorator.d.ts +2 -2
- package/dist/commands/slash-commands/slash-commands.service.js +2 -1
- package/dist/listeners/decorators/listener.decorator.d.ts +2 -2
- package/dist/listeners/listeners.service.js +2 -1
- package/dist/message-components/decorators/message-component.decorator.d.ts +2 -2
- package/dist/message-components/message-components.service.js +2 -1
- package/dist/modals/decorators/modal.decorator.d.ts +2 -1
- package/dist/modals/modals.service.js +2 -1
- package/dist/necord-explorer.service.js +2 -1
- package/dist/necord.module.js +2 -1
- package/dist/text-commands/decorators/text-command.decorator.d.ts +2 -2
- package/dist/text-commands/text-commands.service.js +2 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
# [6.1.2](https://github.com/necordjs/necord/compare/v6.1.1...v6.1.2) - (2023-08-29)
|
|
5
|
+
|
|
6
|
+
## Refactor
|
|
7
|
+
|
|
8
|
+
- Update types for nest version ([d9d1578](https://github.com/necordjs/necord/commit/d9d15780f1cb8745b7f3215bfb2b31115da29f76))
|
|
9
|
+
|
|
4
10
|
# [6.1.0](https://github.com/necordjs/necord/compare/v6.0.0...v6.1.0) - (2023-08-21)
|
|
5
11
|
|
|
6
12
|
## Refactor
|
|
@@ -28,7 +28,7 @@ const necord_module_definition_1 = require("../necord.module-definition");
|
|
|
28
28
|
const discord_js_1 = require("discord.js");
|
|
29
29
|
const context_menus_1 = require("./context-menus");
|
|
30
30
|
const slash_commands_1 = require("./slash-commands");
|
|
31
|
-
let CommandsService =
|
|
31
|
+
let CommandsService = CommandsService_1 = class CommandsService {
|
|
32
32
|
constructor(client, options, contextMenusService, slashCommandsService) {
|
|
33
33
|
this.client = client;
|
|
34
34
|
this.options = options;
|
|
@@ -103,6 +103,7 @@ let CommandsService = exports.CommandsService = CommandsService_1 = class Comman
|
|
|
103
103
|
return this.getGuildCommands(guildId).find(command => command.getName() === name);
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
|
+
exports.CommandsService = CommandsService;
|
|
106
107
|
exports.CommandsService = CommandsService = CommandsService_1 = __decorate([
|
|
107
108
|
(0, common_1.Injectable)(),
|
|
108
109
|
__param(1, (0, common_1.Inject)(necord_module_definition_1.NECORD_MODULE_OPTIONS)),
|
|
@@ -15,7 +15,7 @@ const discord_js_1 = require("discord.js");
|
|
|
15
15
|
const common_1 = require("@nestjs/common");
|
|
16
16
|
const necord_explorer_service_1 = require("../../necord-explorer.service");
|
|
17
17
|
const decorators_1 = require("./decorators");
|
|
18
|
-
let ContextMenusService =
|
|
18
|
+
let ContextMenusService = ContextMenusService_1 = class ContextMenusService {
|
|
19
19
|
constructor(client, explorerService) {
|
|
20
20
|
this.client = client;
|
|
21
21
|
this.explorerService = explorerService;
|
|
@@ -52,6 +52,7 @@ let ContextMenusService = exports.ContextMenusService = ContextMenusService_1 =
|
|
|
52
52
|
return type.toString().concat(':', name);
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
+
exports.ContextMenusService = ContextMenusService;
|
|
55
56
|
exports.ContextMenusService = ContextMenusService = ContextMenusService_1 = __decorate([
|
|
56
57
|
(0, common_1.Injectable)(),
|
|
57
58
|
__metadata("design:paramtypes", [discord_js_1.Client,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ContextMenuMeta } from '../context-menu.discovery';
|
|
2
|
-
export declare const ContextMenu: import("@nestjs/core").ReflectableDecorator<ContextMenuMeta>;
|
|
1
|
+
import { ContextMenuDiscovery, ContextMenuMeta } from '../context-menu.discovery';
|
|
2
|
+
export declare const ContextMenu: import("@nestjs/core").ReflectableDecorator<ContextMenuMeta, ContextMenuDiscovery>;
|
|
@@ -19,7 +19,7 @@ exports.AutocompleteInterceptor = void 0;
|
|
|
19
19
|
const common_1 = require("@nestjs/common");
|
|
20
20
|
const rxjs_1 = require("rxjs");
|
|
21
21
|
const context_1 = require("../../../context");
|
|
22
|
-
let AutocompleteInterceptor =
|
|
22
|
+
let AutocompleteInterceptor = class AutocompleteInterceptor {
|
|
23
23
|
intercept(context, next) {
|
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
25
|
const necordContext = context_1.NecordExecutionContext.create(context);
|
|
@@ -31,6 +31,7 @@ let AutocompleteInterceptor = exports.AutocompleteInterceptor = class Autocomple
|
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
+
exports.AutocompleteInterceptor = AutocompleteInterceptor;
|
|
34
35
|
exports.AutocompleteInterceptor = AutocompleteInterceptor = __decorate([
|
|
35
36
|
(0, common_1.Injectable)()
|
|
36
37
|
], AutocompleteInterceptor);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SlashCommandMeta } from '../slash-command.discovery';
|
|
2
|
-
export declare const SlashCommand: import("@nestjs/core").ReflectableDecorator<Omit<SlashCommandMeta, "type" | "options"
|
|
1
|
+
import { SlashCommandDiscovery, SlashCommandMeta } from '../slash-command.discovery';
|
|
2
|
+
export declare const SlashCommand: import("@nestjs/core").ReflectableDecorator<Omit<SlashCommandMeta, "type" | "options">, SlashCommandDiscovery>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SlashCommandMeta } from '../slash-command.discovery';
|
|
2
|
-
export declare const SubcommandGroup: import("@nestjs/core").ReflectableDecorator<
|
|
1
|
+
import { SlashCommandDiscovery, SlashCommandMeta } from '../slash-command.discovery';
|
|
2
|
+
export declare const SubcommandGroup: import("@nestjs/core").ReflectableDecorator<Omit<SlashCommandMeta, "type" | "guilds" | "options">, SlashCommandDiscovery>;
|
|
3
3
|
export declare const createCommandGroupDecorator: (rootOptions: Omit<SlashCommandMeta, 'type'>) => (subOptions?: Omit<SlashCommandMeta, 'type'>) => ClassDecorator;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SlashCommandMeta } from '../slash-command.discovery';
|
|
2
|
-
export declare const Subcommand: import("@nestjs/core").ReflectableDecorator<Omit<SlashCommandMeta, "type" | "guilds" | "options"
|
|
1
|
+
import { SlashCommandDiscovery, SlashCommandMeta } from '../slash-command.discovery';
|
|
2
|
+
export declare const Subcommand: import("@nestjs/core").ReflectableDecorator<Omit<SlashCommandMeta, "type" | "guilds" | "options">, SlashCommandDiscovery>;
|
|
@@ -16,7 +16,7 @@ const discord_js_1 = require("discord.js");
|
|
|
16
16
|
const necord_explorer_service_1 = require("../../necord-explorer.service");
|
|
17
17
|
const core_1 = require("@nestjs/core");
|
|
18
18
|
const decorators_1 = require("./decorators");
|
|
19
|
-
let SlashCommandsService =
|
|
19
|
+
let SlashCommandsService = SlashCommandsService_1 = class SlashCommandsService {
|
|
20
20
|
constructor(client, explorerService, reflector) {
|
|
21
21
|
this.client = client;
|
|
22
22
|
this.explorerService = explorerService;
|
|
@@ -68,6 +68,7 @@ let SlashCommandsService = exports.SlashCommandsService = SlashCommandsService_1
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
+
exports.SlashCommandsService = SlashCommandsService;
|
|
71
72
|
exports.SlashCommandsService = SlashCommandsService = SlashCommandsService_1 = __decorate([
|
|
72
73
|
(0, common_1.Injectable)(),
|
|
73
74
|
__metadata("design:paramtypes", [discord_js_1.Client,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ListenerMeta } from '../listener.discovery';
|
|
2
|
-
export declare const Listener: import("@nestjs/core").ReflectableDecorator<ListenerMeta>;
|
|
1
|
+
import { ListenerDiscovery, ListenerMeta } from '../listener.discovery';
|
|
2
|
+
export declare const Listener: import("@nestjs/core").ReflectableDecorator<ListenerMeta, ListenerDiscovery>;
|
|
@@ -15,7 +15,7 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const necord_explorer_service_1 = require("../necord-explorer.service");
|
|
16
16
|
const decorators_1 = require("./decorators");
|
|
17
17
|
// Oh... fuck, it looks really shitty
|
|
18
|
-
let ListenersService =
|
|
18
|
+
let ListenersService = class ListenersService {
|
|
19
19
|
constructor(client, explorerService) {
|
|
20
20
|
this.client = client;
|
|
21
21
|
this.explorerService = explorerService;
|
|
@@ -259,6 +259,7 @@ let ListenersService = exports.ListenersService = class ListenersService {
|
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
};
|
|
262
|
+
exports.ListenersService = ListenersService;
|
|
262
263
|
exports.ListenersService = ListenersService = __decorate([
|
|
263
264
|
(0, common_1.Injectable)(),
|
|
264
265
|
__metadata("design:paramtypes", [discord_js_1.Client,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MessageComponentMeta } from '../message-component.discovery';
|
|
2
|
-
export declare const MessageComponent: import("@nestjs/core").ReflectableDecorator<MessageComponentMeta>;
|
|
1
|
+
import { MessageComponentDiscovery, MessageComponentMeta } from '../message-component.discovery';
|
|
2
|
+
export declare const MessageComponent: import("@nestjs/core").ReflectableDecorator<MessageComponentMeta, MessageComponentDiscovery>;
|
|
@@ -15,7 +15,7 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const discord_js_1 = require("discord.js");
|
|
16
16
|
const necord_explorer_service_1 = require("../necord-explorer.service");
|
|
17
17
|
const decorators_1 = require("./decorators");
|
|
18
|
-
let MessageComponentsService =
|
|
18
|
+
let MessageComponentsService = MessageComponentsService_1 = class MessageComponentsService {
|
|
19
19
|
constructor(client, explorerService) {
|
|
20
20
|
this.client = client;
|
|
21
21
|
this.explorerService = explorerService;
|
|
@@ -57,6 +57,7 @@ let MessageComponentsService = exports.MessageComponentsService = MessageCompone
|
|
|
57
57
|
this.cache.delete(this.componentName(type, customId));
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
+
exports.MessageComponentsService = MessageComponentsService;
|
|
60
61
|
exports.MessageComponentsService = MessageComponentsService = MessageComponentsService_1 = __decorate([
|
|
61
62
|
(0, common_1.Injectable)(),
|
|
62
63
|
__metadata("design:paramtypes", [discord_js_1.Client,
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ModalDiscovery } from '../modal.discovery';
|
|
2
|
+
export declare const Modal: import("@nestjs/core").ReflectableDecorator<string, ModalDiscovery>;
|
|
@@ -15,7 +15,7 @@ const common_1 = require("@nestjs/common");
|
|
|
15
15
|
const discord_js_1 = require("discord.js");
|
|
16
16
|
const necord_explorer_service_1 = require("../necord-explorer.service");
|
|
17
17
|
const decorators_1 = require("./decorators");
|
|
18
|
-
let ModalsService =
|
|
18
|
+
let ModalsService = ModalsService_1 = class ModalsService {
|
|
19
19
|
constructor(client, explorerService) {
|
|
20
20
|
this.client = client;
|
|
21
21
|
this.explorerService = explorerService;
|
|
@@ -52,6 +52,7 @@ let ModalsService = exports.ModalsService = ModalsService_1 = class ModalsServic
|
|
|
52
52
|
this.cache.delete(customId);
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
+
exports.ModalsService = ModalsService;
|
|
55
56
|
exports.ModalsService = ModalsService = ModalsService_1 = __decorate([
|
|
56
57
|
(0, common_1.Injectable)(),
|
|
57
58
|
__metadata("design:paramtypes", [discord_js_1.Client,
|
|
@@ -16,7 +16,7 @@ const core_1 = require("@nestjs/core");
|
|
|
16
16
|
const external_context_creator_1 = require("@nestjs/core/helpers/external-context-creator");
|
|
17
17
|
const constants_1 = require("@nestjs/common/constants");
|
|
18
18
|
const constants_2 = require("@nestjs/core/injector/constants");
|
|
19
|
-
let ExplorerService =
|
|
19
|
+
let ExplorerService = class ExplorerService extends core_1.Reflector {
|
|
20
20
|
constructor(discoveryService, externalContextCreator, metadataScanner) {
|
|
21
21
|
super();
|
|
22
22
|
this.discoveryService = discoveryService;
|
|
@@ -50,6 +50,7 @@ let ExplorerService = exports.ExplorerService = class ExplorerService extends co
|
|
|
50
50
|
return this.externalContextCreator.create(instance, prototype[methodName], methodName, constants_1.ROUTE_ARGS_METADATA, this.necordParamsFactory, constants_2.STATIC_CONTEXT, undefined, { guards: true, filters: true, interceptors: true }, 'necord');
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
+
exports.ExplorerService = ExplorerService;
|
|
53
54
|
exports.ExplorerService = ExplorerService = __decorate([
|
|
54
55
|
(0, common_1.Injectable)(),
|
|
55
56
|
__metadata("design:paramtypes", [core_1.DiscoveryService,
|
package/dist/necord.module.js
CHANGED
|
@@ -25,7 +25,7 @@ const necord_explorer_service_1 = require("./necord-explorer.service");
|
|
|
25
25
|
const commands_1 = require("./commands");
|
|
26
26
|
const core_1 = require("@nestjs/core");
|
|
27
27
|
const necord_rest_provider_1 = require("./necord-rest.provider");
|
|
28
|
-
let NecordModule =
|
|
28
|
+
let NecordModule = class NecordModule extends necord_module_definition_1.ConfigurableModuleClass {
|
|
29
29
|
constructor(client, options) {
|
|
30
30
|
super();
|
|
31
31
|
this.client = client;
|
|
@@ -38,6 +38,7 @@ let NecordModule = exports.NecordModule = class NecordModule extends necord_modu
|
|
|
38
38
|
return this.client.destroy();
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
+
exports.NecordModule = NecordModule;
|
|
41
42
|
exports.NecordModule = NecordModule = __decorate([
|
|
42
43
|
(0, common_1.Global)(),
|
|
43
44
|
(0, common_1.Module)({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TextCommandMeta } from '../text-command.discovery';
|
|
2
|
-
export declare const TextCommand: import("@nestjs/core").ReflectableDecorator<TextCommandMeta>;
|
|
1
|
+
import { TextCommandDiscovery, TextCommandMeta } from '../text-command.discovery';
|
|
2
|
+
export declare const TextCommand: import("@nestjs/core").ReflectableDecorator<TextCommandMeta, TextCommandDiscovery>;
|
|
@@ -28,7 +28,7 @@ const discord_js_1 = require("discord.js");
|
|
|
28
28
|
const necord_module_definition_1 = require("../necord.module-definition");
|
|
29
29
|
const necord_explorer_service_1 = require("../necord-explorer.service");
|
|
30
30
|
const decorators_1 = require("./decorators");
|
|
31
|
-
let TextCommandsService =
|
|
31
|
+
let TextCommandsService = TextCommandsService_1 = class TextCommandsService {
|
|
32
32
|
constructor(options, client, explorerService) {
|
|
33
33
|
this.options = options;
|
|
34
34
|
this.client = client;
|
|
@@ -73,6 +73,7 @@ let TextCommandsService = exports.TextCommandsService = TextCommandsService_1 =
|
|
|
73
73
|
this.cache.delete(name);
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
+
exports.TextCommandsService = TextCommandsService;
|
|
76
77
|
exports.TextCommandsService = TextCommandsService = TextCommandsService_1 = __decorate([
|
|
77
78
|
(0, common_1.Injectable)(),
|
|
78
79
|
__param(0, (0, common_1.Inject)(necord_module_definition_1.NECORD_MODULE_OPTIONS)),
|
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.
|
|
4
|
+
"version": "6.1.2-dev.1693311741.39d8bbd",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "rimraf dist && tsc -p tsconfig.build.json",
|
|
7
7
|
"prepublish:npm": "npm run build",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"@commitlint/cli": "17.7.1",
|
|
59
59
|
"@commitlint/config-angular": "17.7.0",
|
|
60
60
|
"@favware/npm-deprecate": "1.0.7",
|
|
61
|
-
"@nestjs/common": "10.2.
|
|
62
|
-
"@nestjs/core": "10.2.
|
|
63
|
-
"@types/node": "20.5.
|
|
64
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
65
|
-
"@typescript-eslint/parser": "6.
|
|
66
|
-
"discord-api-types": "0.37.
|
|
61
|
+
"@nestjs/common": "10.2.2",
|
|
62
|
+
"@nestjs/core": "10.2.2",
|
|
63
|
+
"@types/node": "20.5.7",
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "6.5.0",
|
|
65
|
+
"@typescript-eslint/parser": "6.5.0",
|
|
66
|
+
"discord-api-types": "0.37.55",
|
|
67
67
|
"discord.js": "14.13.0",
|
|
68
|
-
"eslint": "8.
|
|
68
|
+
"eslint": "8.48.0",
|
|
69
69
|
"eslint-config-prettier": "9.0.0",
|
|
70
70
|
"eslint-plugin-prettier": "5.0.0",
|
|
71
71
|
"husky": "8.0.3",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"rimraf": "5.0.1",
|
|
77
77
|
"rxjs": "7.8.1",
|
|
78
78
|
"ts-node": "10.9.1",
|
|
79
|
-
"typescript": "5.
|
|
79
|
+
"typescript": "5.2.2"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"@nestjs/common": "^10.2.0",
|