oopscord.js 0.0.29 → 0.1.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.
- package/LICENSE +674 -201
- package/README.md +212 -11
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/structures/Constants.d.ts +2 -2
- package/dist/structures/Constants.d.ts.map +1 -1
- package/dist/structures/Constants.js +1 -0
- package/dist/structures/Constants.js.map +1 -0
- package/dist/structures/DiscordApp.d.ts +28 -10
- package/dist/structures/DiscordApp.d.ts.map +1 -1
- package/dist/structures/DiscordApp.js +681 -295
- package/dist/structures/DiscordApp.js.map +1 -0
- package/dist/structures/Plugin.d.ts +68 -0
- package/dist/structures/Plugin.d.ts.map +1 -1
- package/dist/structures/Plugin.js +28 -1
- package/dist/structures/Plugin.js.map +1 -0
- package/dist/structures/PluginManager.d.ts +122 -0
- package/dist/structures/PluginManager.d.ts.map +1 -0
- package/dist/structures/PluginManager.js +371 -0
- package/dist/structures/PluginManager.js.map +1 -0
- package/dist/structures/components/BaseButton.d.ts +2 -5
- package/dist/structures/components/BaseButton.d.ts.map +1 -1
- package/dist/structures/components/BaseButton.js +9 -14
- package/dist/structures/components/BaseButton.js.map +1 -0
- package/dist/structures/components/BaseModal.d.ts +13 -21
- package/dist/structures/components/BaseModal.d.ts.map +1 -1
- package/dist/structures/components/BaseModal.js +86 -132
- package/dist/structures/components/BaseModal.js.map +1 -0
- package/dist/structures/components/BaseSelectMenu.d.ts +2 -5
- package/dist/structures/components/BaseSelectMenu.d.ts.map +1 -1
- package/dist/structures/components/BaseSelectMenu.js +21 -25
- package/dist/structures/components/BaseSelectMenu.js.map +1 -0
- package/dist/structures/components/Listener.d.ts +18 -0
- package/dist/structures/components/Listener.d.ts.map +1 -0
- package/dist/structures/components/Listener.js +22 -0
- package/dist/structures/components/Listener.js.map +1 -0
- package/dist/structures/components/index.d.ts +1 -0
- package/dist/structures/components/index.d.ts.map +1 -1
- package/dist/structures/components/index.js +2 -0
- package/dist/structures/components/index.js.map +1 -0
- package/dist/structures/decorators/CommandDecorator.d.ts +39 -38
- package/dist/structures/decorators/CommandDecorator.d.ts.map +1 -1
- package/dist/structures/decorators/CommandDecorator.js +145 -250
- package/dist/structures/decorators/CommandDecorator.js.map +1 -0
- package/dist/structures/decorators/Constants.d.ts +12 -8
- package/dist/structures/decorators/Constants.d.ts.map +1 -1
- package/dist/structures/decorators/Constants.js +13 -8
- package/dist/structures/decorators/Constants.js.map +1 -0
- package/dist/structures/decorators/DiscordModuleDecorator.d.ts +11 -19
- package/dist/structures/decorators/DiscordModuleDecorator.d.ts.map +1 -1
- package/dist/structures/decorators/DiscordModuleDecorator.js +12 -54
- package/dist/structures/decorators/DiscordModuleDecorator.js.map +1 -0
- package/dist/structures/decorators/EventDecorator.d.ts +45 -0
- package/dist/structures/decorators/EventDecorator.d.ts.map +1 -0
- package/dist/structures/decorators/EventDecorator.js +52 -0
- package/dist/structures/decorators/EventDecorator.js.map +1 -0
- package/dist/structures/decorators/ExecutionDecorator.d.ts +19 -0
- package/dist/structures/decorators/ExecutionDecorator.d.ts.map +1 -0
- package/dist/structures/decorators/ExecutionDecorator.js +23 -0
- package/dist/structures/decorators/ExecutionDecorator.js.map +1 -0
- package/dist/structures/decorators/InjectionMetadata.d.ts +35 -0
- package/dist/structures/decorators/InjectionMetadata.d.ts.map +1 -0
- package/dist/structures/decorators/InjectionMetadata.js +34 -0
- package/dist/structures/decorators/InjectionMetadata.js.map +1 -0
- package/dist/structures/decorators/InteractionHandlerDecorator.d.ts +17 -2
- package/dist/structures/decorators/InteractionHandlerDecorator.d.ts.map +1 -1
- package/dist/structures/decorators/InteractionHandlerDecorator.js +48 -7
- package/dist/structures/decorators/InteractionHandlerDecorator.js.map +1 -0
- package/dist/structures/decorators/MessageComponentDecorator.d.ts +25 -40
- package/dist/structures/decorators/MessageComponentDecorator.d.ts.map +1 -1
- package/dist/structures/decorators/MessageComponentDecorator.js +66 -78
- package/dist/structures/decorators/MessageComponentDecorator.js.map +1 -0
- package/dist/structures/decorators/Metadata.d.ts +16 -0
- package/dist/structures/decorators/Metadata.d.ts.map +1 -0
- package/dist/structures/decorators/Metadata.js +50 -0
- package/dist/structures/decorators/Metadata.js.map +1 -0
- package/dist/structures/decorators/PluginDecorator.d.ts +41 -0
- package/dist/structures/decorators/PluginDecorator.d.ts.map +1 -0
- package/dist/structures/decorators/PluginDecorator.js +36 -0
- package/dist/structures/decorators/PluginDecorator.js.map +1 -0
- package/dist/structures/decorators/UseDecorator.d.ts +44 -0
- package/dist/structures/decorators/UseDecorator.d.ts.map +1 -0
- package/dist/structures/decorators/UseDecorator.js +49 -0
- package/dist/structures/decorators/UseDecorator.js.map +1 -0
- package/dist/structures/decorators/index.d.ts +4 -0
- package/dist/structures/decorators/index.d.ts.map +1 -1
- package/dist/structures/decorators/index.js +5 -0
- package/dist/structures/decorators/index.js.map +1 -0
- package/dist/structures/index.d.ts +3 -1
- package/dist/structures/index.d.ts.map +1 -1
- package/dist/structures/index.js +5 -1
- package/dist/structures/index.js.map +1 -0
- package/dist/utils/Util.d.ts +2 -0
- package/dist/utils/Util.d.ts.map +1 -1
- package/dist/utils/Util.js +23 -8
- package/dist/utils/Util.js.map +1 -0
- package/dist/utils/cache.d.ts +4 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +17 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/customId.d.ts +12 -0
- package/dist/utils/customId.d.ts.map +1 -0
- package/dist/utils/customId.js +49 -0
- package/dist/utils/customId.js.map +1 -0
- package/package.json +35 -9
- package/bun.lock +0 -264
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
import { StandardClassDecorator } from "./Metadata";
|
|
1
2
|
import { ClientEvents, ClientOptions } from "discord.js";
|
|
3
|
+
import { Listener } from "../components/Listener";
|
|
4
|
+
import type { SupportSource } from "./UseDecorator";
|
|
2
5
|
export interface ModuleOptions extends ClientOptions {
|
|
3
6
|
token: string;
|
|
4
7
|
imports: (new (...args: any[]) => any)[];
|
|
8
|
+
commands?: (new (...args: any[]) => any)[];
|
|
9
|
+
components?: (new (...args: any[]) => any)[];
|
|
10
|
+
listeners?: typeof Listener[];
|
|
11
|
+
/** Classes or instances that `@Use` injects. Classes are created once with `(client, logger)`. */
|
|
12
|
+
supports?: SupportSource[];
|
|
5
13
|
test?: {
|
|
6
14
|
enable: boolean;
|
|
7
15
|
guild: null | string;
|
|
8
16
|
};
|
|
17
|
+
/** Disables optional manager caches while preserving caches required by Discord.js. */
|
|
9
18
|
disableCache?: boolean;
|
|
10
19
|
}
|
|
11
20
|
/**
|
|
@@ -14,7 +23,7 @@ export interface ModuleOptions extends ClientOptions {
|
|
|
14
23
|
export declare const defaultModuleOptions: ModuleOptions;
|
|
15
24
|
export interface DiscordModuleEvents {
|
|
16
25
|
eventName: keyof ClientEvents;
|
|
17
|
-
methodName: string;
|
|
26
|
+
methodName: string | symbol;
|
|
18
27
|
}
|
|
19
28
|
/**
|
|
20
29
|
* Decorator that marks a class as a Discord module.
|
|
@@ -24,22 +33,5 @@ export interface DiscordModuleEvents {
|
|
|
24
33
|
*
|
|
25
34
|
* @throws {TypeError} If any of the imported modules are not valid Discord modules
|
|
26
35
|
*/
|
|
27
|
-
export declare function DiscordModule(option1: ModuleOptions):
|
|
28
|
-
/**
|
|
29
|
-
* Decorator that registers a method as an event handler for a Discord client event.
|
|
30
|
-
*
|
|
31
|
-
* @param eventName - The name of the Discord client event to listen for
|
|
32
|
-
* @returns A method decorator that registers the decorated method as an event handler
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* class MyModule {
|
|
37
|
-
* @EventHandler('messageCreate')
|
|
38
|
-
* onMessageCreate(message: Message) {
|
|
39
|
-
* // Handle message creation
|
|
40
|
-
* }
|
|
41
|
-
* }
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export declare function EventHandler(eventName: keyof ClientEvents): MethodDecorator;
|
|
36
|
+
export declare function DiscordModule(option1: ModuleOptions): StandardClassDecorator;
|
|
45
37
|
//# sourceMappingURL=DiscordModuleDecorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiscordModuleDecorator.d.ts","sourceRoot":"","sources":["../../../src/structures/decorators/DiscordModuleDecorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGzD,MAAM,WAAW,aAAc,SAAQ,aAAa;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;IACzC,IAAI,CAAC,EAAE;QACH,MAAM,EAAE,OAAO,CAAC;QAChB,KAAK,EAAE,IAAI,GAAG,MAAM,CAAA;KACvB,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"DiscordModuleDecorator.d.ts","sourceRoot":"","sources":["../../../src/structures/decorators/DiscordModuleDecorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGzD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,aAAc,SAAQ,aAAa;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;IACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;IAC3C,UAAU,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;IAC7C,SAAS,CAAC,EAAE,OAAO,QAAQ,EAAE,CAAC;IAC9B,kGAAkG;IAClG,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,IAAI,CAAC,EAAE;QACH,MAAM,EAAE,OAAO,CAAC;QAChB,KAAK,EAAE,IAAI,GAAG,MAAM,CAAA;KACvB,CAAC;IACF,uFAAuF;IACvF,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAalC,CAAA;AAED,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,MAAM,YAAY,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,sBAAsB,CAU5E"}
|
|
@@ -2,14 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultModuleOptions = void 0;
|
|
4
4
|
exports.DiscordModule = DiscordModule;
|
|
5
|
-
|
|
5
|
+
const Metadata_1 = require("./Metadata");
|
|
6
6
|
const Constants_1 = require("./Constants");
|
|
7
|
+
const Util_1 = require("../../utils/Util");
|
|
7
8
|
/**
|
|
8
9
|
* Default configuration options for Discord modules.
|
|
9
10
|
*/
|
|
10
11
|
exports.defaultModuleOptions = {
|
|
11
12
|
token: "",
|
|
12
13
|
imports: [],
|
|
14
|
+
commands: [],
|
|
15
|
+
components: [],
|
|
16
|
+
listeners: [],
|
|
17
|
+
supports: [],
|
|
13
18
|
test: {
|
|
14
19
|
enable: false,
|
|
15
20
|
guild: null,
|
|
@@ -17,11 +22,6 @@ exports.defaultModuleOptions = {
|
|
|
17
22
|
disableCache: false,
|
|
18
23
|
intents: []
|
|
19
24
|
};
|
|
20
|
-
// export interface ExternalModuleEvents {
|
|
21
|
-
// eventName: string;
|
|
22
|
-
// methodName: string;
|
|
23
|
-
// eventEmitter: EventEmitter;
|
|
24
|
-
// }
|
|
25
25
|
/**
|
|
26
26
|
* Decorator that marks a class as a Discord module.
|
|
27
27
|
*
|
|
@@ -31,55 +31,13 @@ exports.defaultModuleOptions = {
|
|
|
31
31
|
* @throws {TypeError} If any of the imported modules are not valid Discord modules
|
|
32
32
|
*/
|
|
33
33
|
function DiscordModule(option1) {
|
|
34
|
-
return
|
|
35
|
-
const options = mergeDefault(exports.defaultModuleOptions, option1);
|
|
34
|
+
return (0, Metadata_1.classDecorator)(metadata => {
|
|
35
|
+
const options = Util_1.Util.mergeDefault(exports.defaultModuleOptions, option1);
|
|
36
36
|
options.imports.forEach(module => {
|
|
37
|
-
if (typeof
|
|
37
|
+
if (typeof (0, Metadata_1.getMetadata)(Constants_1.MODULE_TYPE_KEY, module) != "number")
|
|
38
38
|
throw new TypeError(`${module.name} is not a module.`);
|
|
39
39
|
});
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Decorator that registers a method as an event handler for a Discord client event.
|
|
45
|
-
*
|
|
46
|
-
* @param eventName - The name of the Discord client event to listen for
|
|
47
|
-
* @returns A method decorator that registers the decorated method as an event handler
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```typescript
|
|
51
|
-
* class MyModule {
|
|
52
|
-
* @EventHandler('messageCreate')
|
|
53
|
-
* onMessageCreate(message: Message) {
|
|
54
|
-
* // Handle message creation
|
|
55
|
-
* }
|
|
56
|
-
* }
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
function EventHandler(eventName) {
|
|
60
|
-
return function (target, propertyKey, propertyDescriptor) {
|
|
61
|
-
const events = Reflect.getMetadata(Constants_1.DISCORD_MODULE_INTERNAL_EVENTS_KEY, target.constructor) ?? [];
|
|
62
|
-
events.push({ eventName, methodName: propertyKey });
|
|
63
|
-
Reflect.defineMetadata(Constants_1.DISCORD_MODULE_INTERNAL_EVENTS_KEY, events, target.constructor);
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
// export function ExternalEventHandler(eventName: string, eventEmitter: EventEmitter): MethodDecorator {
|
|
67
|
-
// return function<T>(target: Object, propertyKey: string | symbol, propertyDescriptor: TypedPropertyDescriptor<T>) {
|
|
68
|
-
// const events: ExternalModuleEvents[] = Reflect.getMetadata(DISCORD_MODULE_EXTERNAL_EVENTS_KEY, target) ?? [];
|
|
69
|
-
// events.push({ eventName, methodName: propertyKey as string, eventEmitter });
|
|
70
|
-
// Reflect.defineMetadata(DISCORD_MODULE_EXTERNAL_EVENTS_KEY, events, target.constructor);
|
|
71
|
-
// }
|
|
72
|
-
// }
|
|
73
|
-
function mergeDefault(def, given) {
|
|
74
|
-
if (!given)
|
|
75
|
-
return def;
|
|
76
|
-
for (const key in def) {
|
|
77
|
-
if (!Object.hasOwn(given, key) || given[key] === undefined) {
|
|
78
|
-
given[key] = def[key];
|
|
79
|
-
}
|
|
80
|
-
else if (given[key] === Object(given[key])) {
|
|
81
|
-
given[key] = mergeDefault(def[key], given[key]);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return given;
|
|
40
|
+
metadata[Constants_1.DICSORD_MODULE_OPTIONS_KEY] = options;
|
|
41
|
+
});
|
|
85
42
|
}
|
|
43
|
+
//# sourceMappingURL=DiscordModuleDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DiscordModuleDecorator.js","sourceRoot":"","sources":["../../../src/structures/decorators/DiscordModuleDecorator.ts"],"names":[],"mappings":";;;AAsDA,sCAUC;AAhED,yCAAiF;AAEjF,2CAA0E;AAC1E,2CAAwC;AAoBxC;;GAEG;AACU,QAAA,oBAAoB,GAAkB;IAC/C,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE;QACF,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,IAAI;KACd;IACD,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,EAAE;CACd,CAAA;AAOD;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,OAAsB;IAChD,OAAO,IAAA,yBAAc,EAAC,QAAQ,CAAC,EAAE;QAC7B,MAAM,OAAO,GAAG,WAAI,CAAC,YAAY,CAAC,4BAAoB,EAAE,OAAO,CAAC,CAAC;QAEjE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAC7B,IAAI,OAAO,IAAA,sBAAW,EAAC,2BAAe,EAAE,MAAM,CAAC,IAAI,QAAQ;gBAAE,MAAM,IAAI,SAAS,CAAC,GAAG,MAAM,CAAC,IAAI,mBAAmB,CAAC,CAAC;QACxH,CAAC,CAAC,CAAC;QAEH,QAAQ,CAAC,sCAA0B,CAAC,GAAG,OAAO,CAAC;IACnD,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { StandardClassDecorator } from "./Metadata";
|
|
2
|
+
import { ClientEvents } from "discord.js";
|
|
3
|
+
import { Listener } from "../components/Listener";
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for the `EventModule` decorator.
|
|
6
|
+
*
|
|
7
|
+
* - `listeners`: an array of listener classes (constructors) that the
|
|
8
|
+
* module system can instantiate and register when this module is loaded.
|
|
9
|
+
*/
|
|
10
|
+
export interface EventModuleOptions {
|
|
11
|
+
listeners?: typeof Listener[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Class decorator that marks a class as an event module.
|
|
15
|
+
*
|
|
16
|
+
* The decorator is intended to be used by the module loader to discover
|
|
17
|
+
* and register event listener classes associated with a module. It stores
|
|
18
|
+
* configuration on the class (via metadata) so runtime code can act on it.
|
|
19
|
+
*
|
|
20
|
+
* @param options - Options describing listener classes to register
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* @EventModule({ listeners: [MyListener, OtherListener] })
|
|
24
|
+
* class MyModule {}
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function EventModule(options: EventModuleOptions): StandardClassDecorator;
|
|
28
|
+
/**
|
|
29
|
+
* Decorator that registers a method as an event handler for a Discord client event.
|
|
30
|
+
*
|
|
31
|
+
* @param eventName - The name of the Discord client event to listen for
|
|
32
|
+
* @returns A method decorator that registers the decorated method as an event handler
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* class MyModule {
|
|
37
|
+
* @EventHandler('messageCreate')
|
|
38
|
+
* onMessageCreate(message: Message) {
|
|
39
|
+
* // Handle message creation
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare function EventHandler(eventName: keyof ClientEvents): <This, Value extends (this: This, ...args: any[]) => any>(_value: Value, context: ClassMethodDecoratorContext<This, Value>) => void;
|
|
45
|
+
//# sourceMappingURL=EventDecorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventDecorator.d.ts","sourceRoot":"","sources":["../../../src/structures/decorators/EventDecorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwD,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC1G,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IAC/B,SAAS,CAAC,EAAE,OAAO,QAAQ,EAAE,CAAA;CAChC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,sBAAsB,CAK/E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,YAAY,IAC9C,IAAI,EAAE,KAAK,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,QAAQ,KAAK,EAAE,SAAS,2BAA2B,CAAC,IAAI,EAAE,KAAK,CAAC,KAAG,IAAI,CAO3I"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventModule = EventModule;
|
|
4
|
+
exports.EventHandler = EventHandler;
|
|
5
|
+
const Metadata_1 = require("./Metadata");
|
|
6
|
+
const Constants_1 = require("./Constants");
|
|
7
|
+
/**
|
|
8
|
+
* Class decorator that marks a class as an event module.
|
|
9
|
+
*
|
|
10
|
+
* The decorator is intended to be used by the module loader to discover
|
|
11
|
+
* and register event listener classes associated with a module. It stores
|
|
12
|
+
* configuration on the class (via metadata) so runtime code can act on it.
|
|
13
|
+
*
|
|
14
|
+
* @param options - Options describing listener classes to register
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* @EventModule({ listeners: [MyListener, OtherListener] })
|
|
18
|
+
* class MyModule {}
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
function EventModule(options) {
|
|
22
|
+
return (0, Metadata_1.classDecorator)(metadata => {
|
|
23
|
+
metadata[Constants_1.MODULE_TYPE_KEY] = Constants_1.ModuleType.EVENT;
|
|
24
|
+
metadata[Constants_1.EVENT_MODULE_LISTENERS_KEY] = options.listeners ?? [];
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Decorator that registers a method as an event handler for a Discord client event.
|
|
29
|
+
*
|
|
30
|
+
* @param eventName - The name of the Discord client event to listen for
|
|
31
|
+
* @returns A method decorator that registers the decorated method as an event handler
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* class MyModule {
|
|
36
|
+
* @EventHandler('messageCreate')
|
|
37
|
+
* onMessageCreate(message: Message) {
|
|
38
|
+
* // Handle message creation
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
function EventHandler(eventName) {
|
|
44
|
+
return (_value, context) => {
|
|
45
|
+
(0, Metadata_1.assertHandlerMethod)(context);
|
|
46
|
+
const metadata = (0, Metadata_1.requireMetadata)(context);
|
|
47
|
+
const events = [...(metadata[Constants_1.INTERNAL_EVENTS_KEY] ?? [])];
|
|
48
|
+
events.push({ eventName, methodName: context.name });
|
|
49
|
+
metadata[Constants_1.INTERNAL_EVENTS_KEY] = events;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=EventDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EventDecorator.js","sourceRoot":"","sources":["../../../src/structures/decorators/EventDecorator.ts"],"names":[],"mappings":";;AA8BA,kCAKC;AAkBD,oCAQC;AA7DD,yCAA0G;AAE1G,2CAA2G;AAc3G;;;;;;;;;;;;;GAaG;AACH,SAAgB,WAAW,CAAC,OAA2B;IACnD,OAAO,IAAA,yBAAc,EAAC,QAAQ,CAAC,EAAE;QAC7B,QAAQ,CAAC,2BAAe,CAAC,GAAG,sBAAU,CAAC,KAAK,CAAC;QAC7C,QAAQ,CAAC,sCAA0B,CAAC,GAAG,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC;IACnE,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,YAAY,CAAC,SAA6B;IACtD,OAAO,CAA0D,MAAa,EAAE,OAAiD,EAAQ,EAAE;QACvI,IAAA,8BAAmB,EAAC,OAAO,CAAC,CAAC;QAC7B,MAAM,QAAQ,GAAG,IAAA,0BAAe,EAAC,OAAO,CAAC,CAAC;QAC1C,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,+BAAmB,CAA0B,IAAI,EAAE,CAAC,CAAC,CAAC;QACnF,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QACrD,QAAQ,CAAC,+BAAmB,CAAC,GAAG,MAAM,CAAC;IAC3C,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Interaction } from "discord.js";
|
|
2
|
+
import type { Logger } from "../DiscordApp";
|
|
3
|
+
import { StandardClassDecorator } from "./Metadata";
|
|
4
|
+
export interface GuardContext {
|
|
5
|
+
interaction: Interaction;
|
|
6
|
+
handler: Function;
|
|
7
|
+
parameters: Readonly<Record<string, string>>;
|
|
8
|
+
logger: Logger;
|
|
9
|
+
}
|
|
10
|
+
export type InteractionGuard = (context: GuardContext) => boolean | Promise<boolean>;
|
|
11
|
+
export interface CooldownOptions {
|
|
12
|
+
duration: number;
|
|
13
|
+
scope: "user" | "guild" | "global";
|
|
14
|
+
}
|
|
15
|
+
/** Runs predicates before constructing a handler; false prevents execution. */
|
|
16
|
+
export declare function Guard(...guards: InteractionGuard[]): StandardClassDecorator;
|
|
17
|
+
/** Limits successful dispatch attempts; storage is local to each application instance. */
|
|
18
|
+
export declare function Cooldown(duration: number, scope?: CooldownOptions["scope"]): StandardClassDecorator;
|
|
19
|
+
//# sourceMappingURL=ExecutionDecorator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutionDecorator.d.ts","sourceRoot":"","sources":["../../../src/structures/decorators/ExecutionDecorator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAkB,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpE,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,QAAQ,CAAC;IAClB,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7C,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACrF,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;CACtC;AAED,+EAA+E;AAC/E,wBAAgB,KAAK,CAAC,GAAG,MAAM,EAAE,gBAAgB,EAAE,GAAG,sBAAsB,CAK3E;AAED,0FAA0F;AAC1F,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAE,eAAe,CAAC,OAAO,CAAU,GAAG,sBAAsB,CAI3G"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Guard = Guard;
|
|
4
|
+
exports.Cooldown = Cooldown;
|
|
5
|
+
const Constants_1 = require("./Constants");
|
|
6
|
+
const Metadata_1 = require("./Metadata");
|
|
7
|
+
/** Runs predicates before constructing a handler; false prevents execution. */
|
|
8
|
+
function Guard(...guards) {
|
|
9
|
+
if (guards.some(guard => typeof guard !== "function"))
|
|
10
|
+
throw new TypeError("Guards must be functions.");
|
|
11
|
+
return (0, Metadata_1.classDecorator)(metadata => {
|
|
12
|
+
metadata[Constants_1.INTERACTION_GUARDS_KEY] = [...(metadata[Constants_1.INTERACTION_GUARDS_KEY] ?? []), ...guards];
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/** Limits successful dispatch attempts; storage is local to each application instance. */
|
|
16
|
+
function Cooldown(duration, scope = "user") {
|
|
17
|
+
if (!Number.isFinite(duration) || duration <= 0)
|
|
18
|
+
throw new RangeError("Cooldown duration must be positive.");
|
|
19
|
+
if (!["user", "guild", "global"].includes(scope))
|
|
20
|
+
throw new TypeError("Invalid cooldown scope.");
|
|
21
|
+
return (0, Metadata_1.classDecorator)(metadata => { metadata[Constants_1.INTERACTION_COOLDOWN_KEY] = { duration, scope }; });
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=ExecutionDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutionDecorator.js","sourceRoot":"","sources":["../../../src/structures/decorators/ExecutionDecorator.ts"],"names":[],"mappings":";;AAmBA,sBAKC;AAGD,4BAIC;AA7BD,2CAA+E;AAC/E,yCAAoE;AAepE,+EAA+E;AAC/E,SAAgB,KAAK,CAAC,GAAG,MAA0B;IAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,KAAK,KAAK,UAAU,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,2BAA2B,CAAC,CAAC;IACxG,OAAO,IAAA,yBAAc,EAAC,QAAQ,CAAC,EAAE;QAC7B,QAAQ,CAAC,kCAAsB,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,kCAAsB,CAAuB,IAAI,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;IACtH,CAAC,CAAC,CAAC;AACP,CAAC;AAED,0FAA0F;AAC1F,SAAgB,QAAQ,CAAC,QAAgB,EAAE,QAAkC,MAAM;IAC/E,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,qCAAqC,CAAC,CAAC;IAC7G,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,yBAAyB,CAAC,CAAC;IACjG,OAAO,IAAA,yBAAc,EAAC,QAAQ,CAAC,EAAE,GAAG,QAAQ,CAAC,oCAAwB,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACrG,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { SlashCommandOptions } from "../Constants";
|
|
2
|
+
import type { UseTarget } from "./UseDecorator";
|
|
3
|
+
export type OptionGetter = "getString" | "getInteger" | "getNumber" | "getBoolean" | "getUser" | "getChannel" | "getRole" | "getMentionable" | "getAttachment";
|
|
4
|
+
export type ModalFieldType = "text_input" | "select_menu" | "file_upload" | "radio_group" | "checkbox" | "checkbox_group";
|
|
5
|
+
export type InjectionSource = {
|
|
6
|
+
kind: "interaction";
|
|
7
|
+
} | {
|
|
8
|
+
kind: "context";
|
|
9
|
+
} | {
|
|
10
|
+
kind: "custom_id";
|
|
11
|
+
name: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "use";
|
|
14
|
+
use: UseTarget | (() => UseTarget);
|
|
15
|
+
} | {
|
|
16
|
+
kind: "option";
|
|
17
|
+
name: string;
|
|
18
|
+
getMethod: OptionGetter;
|
|
19
|
+
option: SlashCommandOptions;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "modal_field";
|
|
22
|
+
customId: string;
|
|
23
|
+
type: ModalFieldType;
|
|
24
|
+
};
|
|
25
|
+
export type PropertyInjection = InjectionSource & {
|
|
26
|
+
property: string | symbol;
|
|
27
|
+
private: boolean;
|
|
28
|
+
set(instance: any, value: any): void;
|
|
29
|
+
};
|
|
30
|
+
export type InjectionDecorator = <This, Value>(value: undefined, context: ClassFieldDecoratorContext<This, Value>) => void;
|
|
31
|
+
/** Registers a field injection and replaces inherited configuration for that field. */
|
|
32
|
+
export declare function registerInjection<This, Value>(context: ClassFieldDecoratorContext<This, Value>, source: InjectionSource): void;
|
|
33
|
+
/** Creates a field decorator for an explicit injection source. */
|
|
34
|
+
export declare function injectionDecorator(source: InjectionSource): InjectionDecorator;
|
|
35
|
+
//# sourceMappingURL=InjectionMetadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InjectionMetadata.d.ts","sourceRoot":"","sources":["../../../src/structures/decorators/InjectionMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAIhD,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAC/J,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAC1H,MAAM,MAAM,eAAe,GACrB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,mBAAmB,CAAA;CAAE,GACtF;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG;IAC9C,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAAC;CACxC,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,0BAA0B,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC;AAI3H,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,0BAA0B,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,CAiB9H;AAED,kEAAkE;AAClE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,kBAAkB,CAE9E"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerInjection = registerInjection;
|
|
4
|
+
exports.injectionDecorator = injectionDecorator;
|
|
5
|
+
const Constants_1 = require("./Constants");
|
|
6
|
+
const Metadata_1 = require("./Metadata");
|
|
7
|
+
const ownProperties = new WeakMap();
|
|
8
|
+
/** Registers a field injection and replaces inherited configuration for that field. */
|
|
9
|
+
function registerInjection(context, source) {
|
|
10
|
+
if (context.kind !== "field" || context.static)
|
|
11
|
+
throw new TypeError("Injection decorators require an instance field.");
|
|
12
|
+
const metadata = (0, Metadata_1.requireMetadata)(context);
|
|
13
|
+
const own = ownProperties.get(metadata) ?? new Set();
|
|
14
|
+
if (own.has(context.name))
|
|
15
|
+
throw new TypeError("Duplicate injection for " + String(context.name));
|
|
16
|
+
own.add(context.name);
|
|
17
|
+
ownProperties.set(metadata, own);
|
|
18
|
+
const properties = (metadata[Constants_1.INJECTION_PROPERTIES_KEY] ?? []);
|
|
19
|
+
const previous = context.private ? undefined : properties.find(property => !property.private && property.property === context.name);
|
|
20
|
+
const options = (metadata[Constants_1.COMMAND_OPTIONS_KEY] ?? []);
|
|
21
|
+
if (previous?.kind === "option")
|
|
22
|
+
metadata[Constants_1.COMMAND_OPTIONS_KEY] = options.filter(option => option !== previous.option);
|
|
23
|
+
if (source.kind === "option")
|
|
24
|
+
metadata[Constants_1.COMMAND_OPTIONS_KEY] = [...(metadata[Constants_1.COMMAND_OPTIONS_KEY] ?? []), source.option];
|
|
25
|
+
metadata[Constants_1.INJECTION_PROPERTIES_KEY] = [
|
|
26
|
+
...properties.filter(property => property !== previous),
|
|
27
|
+
{ ...source, property: context.name, private: context.private, set: context.access.set }
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
/** Creates a field decorator for an explicit injection source. */
|
|
31
|
+
function injectionDecorator(source) {
|
|
32
|
+
return (_value, context) => registerInjection(context, source);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=InjectionMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InjectionMetadata.js","sourceRoot":"","sources":["../../../src/structures/decorators/InjectionMetadata.ts"],"names":[],"mappings":";;AAwBA,8CAiBC;AAGD,gDAEC;AA5CD,2CAA4E;AAC5E,yCAA6C;AAkB7C,MAAM,aAAa,GAAG,IAAI,OAAO,EAAiD,CAAC;AAEnF,uFAAuF;AACvF,SAAgB,iBAAiB,CAAc,OAAgD,EAAE,MAAuB;IACpH,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,IAAI,OAAO,CAAC,MAAM;QAAE,MAAM,IAAI,SAAS,CAAC,iDAAiD,CAAC,CAAC;IACvH,MAAM,QAAQ,GAAG,IAAA,0BAAe,EAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,GAAG,EAAmB,CAAC;IACtE,IAAI,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,0BAA0B,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAClG,GAAG,CAAC,GAAG,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AAO,EAAE,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InjectionDecorator } from "./InjectionMetadata";
|
|
2
|
+
import { StandardClassDecorator } from "./Metadata";
|
|
3
|
+
/**
|
|
4
|
+
* Injects a huruhuru CommandContext into an instance field.
|
|
5
|
+
* Autocomplete receives undefined; use @Interaction for its raw interaction.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Context<This, Value>(_value: undefined, context: ClassFieldDecoratorContext<This, Value>): void;
|
|
8
|
+
/** Matches colon-separated IDs such as ticket:close:{ticketId}. Exact routes take precedence. */
|
|
9
|
+
export declare function CustomId(pattern: string): StandardClassDecorator;
|
|
10
|
+
/** Injects a named parameter captured by @CustomId into an instance field. */
|
|
11
|
+
export declare function CustomIdInjection(name: string): InjectionDecorator;
|
|
12
|
+
/** Registers a method that returns autocomplete choices for the named option. */
|
|
13
|
+
export declare function Autocomplete(optionName: string): <This, Value extends (this: This, ...args: any[]) => any>(_value: Value, context: ClassMethodDecoratorContext<This, Value>) => void;
|
|
14
|
+
/** Registers the instance method invoked after property injection. */
|
|
15
|
+
export declare function Run<This, Value extends (this: This, ...args: any[]) => any>(_value: Value, context: ClassMethodDecoratorContext<This, Value>): void;
|
|
16
|
+
/** Injects the raw Discord interaction into an instance field. */
|
|
17
|
+
export declare function Interaction<This, Value>(_value: undefined, context: ClassFieldDecoratorContext<This, Value>): void;
|
|
3
18
|
//# sourceMappingURL=InteractionHandlerDecorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InteractionHandlerDecorator.d.ts","sourceRoot":"","sources":["../../../src/structures/decorators/InteractionHandlerDecorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InteractionHandlerDecorator.d.ts","sourceRoot":"","sources":["../../../src/structures/decorators/InteractionHandlerDecorator.ts"],"names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
exports.CustomIdInjection = CustomIdInjection;
|
|
6
|
+
exports.Autocomplete = Autocomplete;
|
|
3
7
|
exports.Run = Run;
|
|
4
8
|
exports.Interaction = Interaction;
|
|
5
9
|
const Constants_1 = require("./Constants");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
const InjectionMetadata_1 = require("./InjectionMetadata");
|
|
11
|
+
const Metadata_1 = require("./Metadata");
|
|
12
|
+
const ownAutocompleteHandlers = new WeakMap();
|
|
13
|
+
/**
|
|
14
|
+
* Injects a huruhuru CommandContext into an instance field.
|
|
15
|
+
* Autocomplete receives undefined; use @Interaction for its raw interaction.
|
|
16
|
+
*/
|
|
17
|
+
function Context(_value, context) {
|
|
18
|
+
(0, InjectionMetadata_1.registerInjection)(context, { kind: "context" });
|
|
9
19
|
}
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
Reflect.defineMetadata(Constants_1.INTERACTION_PARAMETER_INDEX_KEY, parameterIndex, constructor);
|
|
20
|
+
/** Matches colon-separated IDs such as ticket:close:{ticketId}. Exact routes take precedence. */
|
|
21
|
+
function CustomId(pattern) {
|
|
22
|
+
return (0, Metadata_1.classDecorator)(metadata => { metadata[Constants_1.CUSTOM_ID_PATTERN_KEY] = pattern; });
|
|
14
23
|
}
|
|
24
|
+
/** Injects a named parameter captured by @CustomId into an instance field. */
|
|
25
|
+
function CustomIdInjection(name) {
|
|
26
|
+
return (0, InjectionMetadata_1.injectionDecorator)({ kind: "custom_id", name });
|
|
27
|
+
}
|
|
28
|
+
/** Registers a method that returns autocomplete choices for the named option. */
|
|
29
|
+
function Autocomplete(optionName) {
|
|
30
|
+
return (_value, context) => {
|
|
31
|
+
(0, Metadata_1.assertHandlerMethod)(context);
|
|
32
|
+
const metadata = (0, Metadata_1.requireMetadata)(context);
|
|
33
|
+
const own = ownAutocompleteHandlers.get(metadata) ?? new Set();
|
|
34
|
+
if (own.has(optionName))
|
|
35
|
+
throw new TypeError("Duplicate autocomplete handler for " + optionName);
|
|
36
|
+
own.add(optionName);
|
|
37
|
+
ownAutocompleteHandlers.set(metadata, own);
|
|
38
|
+
const methods = { ...(metadata[Constants_1.AUTOCOMPLETE_METHODS_KEY] ?? {}) };
|
|
39
|
+
methods[optionName] = context.name;
|
|
40
|
+
metadata[Constants_1.AUTOCOMPLETE_METHODS_KEY] = methods;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** Registers the instance method invoked after property injection. */
|
|
44
|
+
function Run(_value, context) {
|
|
45
|
+
(0, Metadata_1.assertHandlerMethod)(context);
|
|
46
|
+
const metadata = (0, Metadata_1.requireMetadata)(context);
|
|
47
|
+
if (Object.hasOwn(metadata, Constants_1.INTERACTION_RUN_METHOD_KEY))
|
|
48
|
+
throw new TypeError("Duplicate @Run method.");
|
|
49
|
+
metadata[Constants_1.INTERACTION_RUN_METHOD_KEY] = context.name;
|
|
50
|
+
}
|
|
51
|
+
/** Injects the raw Discord interaction into an instance field. */
|
|
52
|
+
function Interaction(_value, context) {
|
|
53
|
+
(0, InjectionMetadata_1.registerInjection)(context, { kind: "interaction" });
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=InteractionHandlerDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractionHandlerDecorator.js","sourceRoot":"","sources":["../../../src/structures/decorators/InteractionHandlerDecorator.ts"],"names":[],"mappings":";;AAUA,0BAEC;AAGD,4BAEC;AAGD,8CAEC;AAGD,oCAYC;AAGD,kBAKC;AAGD,kCAEC;AAlDD,2CAA0G;AAC1G,2DAAgG;AAChG,yCAA0G;AAE1G,MAAM,uBAAuB,GAAG,IAAI,OAAO,EAAwC,CAAC;AAEpF;;;GAGG;AACH,SAAgB,OAAO,CAAc,MAAiB,EAAE,OAAgD;IACpG,IAAA,qCAAiB,EAAC,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,iGAAiG;AACjG,SAAgB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AAC,CAAC;IAC1C,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,sCAA0B,CAAC;QAAE,MAAM,IAAI,SAAS,CAAC,wBAAwB,CAAC,CAAC;IACvG,QAAQ,CAAC,sCAA0B,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;AACxD,CAAC;AAED,kEAAkE;AAClE,SAAgB,WAAW,CAAc,MAAiB,EAAE,OAAgD;IACxG,IAAA,qCAAiB,EAAC,OAAO,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { StandardClassDecorator } from "./Metadata";
|
|
1
2
|
import { ComponentEmojiResolvable, LabelBuilder, TextDisplayBuilder } from "discord.js";
|
|
2
3
|
import { ButtonStyle, ChannelType, TextInputStyle } from "discord-api-types/v10";
|
|
4
|
+
import { InjectionDecorator } from "./InjectionMetadata";
|
|
3
5
|
type DistributiveOmit<T, K extends keyof T> = T extends unknown ? Omit<T, K> : never;
|
|
4
6
|
export type ButtonOptions = InteractionButtonOptions | LinkButtonOptions | PremiumButtonOptions;
|
|
5
7
|
export type MessageComponentModuleOptions = {
|
|
6
|
-
components
|
|
8
|
+
components?: (new (...args: any[]) => any)[];
|
|
7
9
|
};
|
|
8
10
|
export type InteractionButtonOptions = {
|
|
9
11
|
customId: string;
|
|
@@ -146,44 +148,27 @@ export type ModalLabelComponent = DistributiveOmit<ModalComponentBase & {
|
|
|
146
148
|
required?: boolean;
|
|
147
149
|
disabled?: never;
|
|
148
150
|
}, "disabled">;
|
|
149
|
-
export
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
export
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
export
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
export
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
export
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
export type ModalFieldIndex = TextInputFieldIndex | SelectMenuFieldIndex | FileUploadFieldIndex | RadioGroupFieldIndex | CheckboxFieldIndex | CheckboxGroupFieldIndex;
|
|
172
|
-
export declare function MessageComponentModule(options: MessageComponentModuleOptions): <T extends Function>(constructor: T) => void;
|
|
173
|
-
export declare function Button(options: InteractionButtonOptions | LinkButtonOptions): <T extends Function>(constructor: T) => void;
|
|
174
|
-
export declare function StringSelectMenu(options: StringSelectMenuOptions): <T extends Function>(constructor: T) => void;
|
|
175
|
-
export declare function UserSelectMenu(options: UserSelectMenuOptions): <T extends Function>(constructor: T) => void;
|
|
176
|
-
export declare function ChannelSelectMenu(options: ChannelSelectMenuOptions): <T extends Function>(constructor: T) => void;
|
|
177
|
-
export declare function RoleSelectMenu(options: RoleSelectMenuOptions): <T extends Function>(constructor: T) => void;
|
|
178
|
-
export declare function MentionableSelectMenu(options: MentionableSelectMenuOptions): <T extends Function>(constructor: T) => void;
|
|
179
|
-
export declare function Modal(options: ModalOptions): <T extends Function>(constructor: T) => void;
|
|
180
|
-
export declare function ModalLabel(options: ModalLabelOptions): <T extends Function>(constructor: T) => void;
|
|
181
|
-
export declare function ModalTextDisplay(options: ModalTextDisplay): <T extends Function>(constructor: T) => void;
|
|
182
|
-
export declare function TextInputFieldInjection(customId: string): (target: Object, _propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
183
|
-
export declare function SelectMenuFieldInjection(customId: string): (target: Object, _propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
184
|
-
export declare function FileUploadFieldInjection(customId: string): (target: Object, _propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
185
|
-
export declare function RadioGroupFieldInjection(customId: string): (target: Object, _propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
186
|
-
export declare function CheckboxFieldInjection(customId: string): (target: Object, _propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
187
|
-
export declare function CheckboxGroupFieldInjection(customId: string): (target: Object, _propertyKey: string | symbol | undefined, parameterIndex: number) => void;
|
|
151
|
+
export declare function MessageComponentModule(options: MessageComponentModuleOptions): StandardClassDecorator;
|
|
152
|
+
export declare function Button(options: ButtonOptions): StandardClassDecorator;
|
|
153
|
+
export declare function StringSelectMenu(options: StringSelectMenuOptions): StandardClassDecorator;
|
|
154
|
+
export declare function UserSelectMenu(options: UserSelectMenuOptions): StandardClassDecorator;
|
|
155
|
+
export declare function ChannelSelectMenu(options: ChannelSelectMenuOptions): StandardClassDecorator;
|
|
156
|
+
export declare function RoleSelectMenu(options: RoleSelectMenuOptions): StandardClassDecorator;
|
|
157
|
+
export declare function MentionableSelectMenu(options: MentionableSelectMenuOptions): StandardClassDecorator;
|
|
158
|
+
export declare function Modal(options: ModalOptions): StandardClassDecorator;
|
|
159
|
+
export declare function ModalLabel(options: ModalLabelOptions): StandardClassDecorator;
|
|
160
|
+
export declare function ModalTextDisplay(options: ModalTextDisplay): StandardClassDecorator;
|
|
161
|
+
/** Injects a submitted text input into an instance field. */
|
|
162
|
+
export declare function TextInputFieldInjection(customId: string): InjectionDecorator;
|
|
163
|
+
/** Injects a submitted select menu's values into an instance field. */
|
|
164
|
+
export declare function SelectMenuFieldInjection(customId: string): InjectionDecorator;
|
|
165
|
+
/** Injects submitted files into an instance field. */
|
|
166
|
+
export declare function FileUploadFieldInjection(customId: string): InjectionDecorator;
|
|
167
|
+
/** Injects a submitted radio group's value into an instance field. */
|
|
168
|
+
export declare function RadioGroupFieldInjection(customId: string): InjectionDecorator;
|
|
169
|
+
/** Injects a submitted checkbox's value into an instance field. */
|
|
170
|
+
export declare function CheckboxFieldInjection(customId: string): InjectionDecorator;
|
|
171
|
+
/** Injects a submitted checkbox group's values into an instance field. */
|
|
172
|
+
export declare function CheckboxGroupFieldInjection(customId: string): InjectionDecorator;
|
|
188
173
|
export {};
|
|
189
174
|
//# sourceMappingURL=MessageComponentDecorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageComponentDecorator.d.ts","sourceRoot":"","sources":["../../../src/structures/decorators/MessageComponentDecorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmE,wBAAwB,EAAqB,YAAY,EAAmG,kBAAkB,EAA2C,MAAM,YAAY,CAAC;AACtT,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageComponentDecorator.d.ts","sourceRoot":"","sources":["../../../src/structures/decorators/MessageComponentDecorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAmE,wBAAwB,EAAqB,YAAY,EAAmG,kBAAkB,EAA2C,MAAM,YAAY,CAAC;AACtT,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGjF,OAAO,EAAE,kBAAkB,EAAsC,MAAM,qBAAqB,CAAC;AAE7F,KAAK,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC;AAErF,MAAM,MAAM,aAAa,GAAG,wBAAwB,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAChG,MAAM,MAAM,6BAA6B,GAAG;IAAE,UAAU,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,EAAE,CAAA;CAAE,CAAA;AAC5F,MAAM,MAAM,wBAAwB,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,wBAAwB,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,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