necord 4.1.0-dev.1643458784.7c4e616 → 4.2.1
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/dist/context/index.d.ts +3 -3
- package/dist/context/index.js +15 -15
- package/dist/context/necord-arguments-host.d.ts +15 -13
- package/dist/context/necord-arguments-host.js +25 -22
- package/dist/context/necord-execution-context.d.ts +6 -6
- package/dist/context/necord-execution-context.js +13 -13
- package/dist/context/necord-params.factory.d.ts +10 -10
- package/dist/context/necord-params.factory.js +26 -26
- package/dist/decorators/autocomplete.decorator.d.ts +3 -3
- package/dist/decorators/autocomplete.decorator.js +7 -7
- package/dist/decorators/commands.decorator.d.ts +5 -5
- package/dist/decorators/commands.decorator.js +36 -36
- package/dist/decorators/components.decorator.d.ts +2 -2
- package/dist/decorators/components.decorator.js +8 -8
- package/dist/decorators/guilds.decorator.d.ts +2 -2
- package/dist/decorators/guilds.decorator.js +7 -7
- package/dist/decorators/index.d.ts +8 -8
- package/dist/decorators/index.js +20 -20
- package/dist/decorators/listeners.decorator.d.ts +3 -3
- package/dist/decorators/listeners.decorator.js +13 -13
- package/dist/decorators/options.decorator.d.ts +65 -65
- package/dist/decorators/options.decorator.js +22 -22
- package/dist/decorators/params.decorator.d.ts +5 -5
- package/dist/decorators/params.decorator.js +17 -17
- package/dist/decorators/params.util.d.ts +4 -4
- package/dist/decorators/params.util.js +24 -24
- package/dist/decorators/permissions.decorator.d.ts +6 -6
- package/dist/decorators/permissions.decorator.js +17 -17
- package/dist/exceptions/index.d.ts +1 -1
- package/dist/exceptions/index.js +13 -13
- package/dist/exceptions/necord.exception.d.ts +2 -2
- package/dist/exceptions/necord.exception.js +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +18 -18
- package/dist/interfaces/index.d.ts +3 -3
- package/dist/interfaces/index.js +15 -15
- package/dist/interfaces/necord-events.interface.d.ts +88 -88
- package/dist/interfaces/necord-events.interface.js +2 -2
- package/dist/interfaces/necord-metadata.interface.d.ts +38 -38
- package/dist/interfaces/necord-metadata.interface.js +2 -2
- package/dist/interfaces/necord-options.interface.d.ts +16 -16
- package/dist/interfaces/necord-options.interface.js +2 -2
- package/dist/necord-explorer.d.ts +29 -29
- package/dist/necord-explorer.js +120 -120
- package/dist/necord-interaction.update.d.ts +11 -11
- package/dist/necord-interaction.update.js +165 -157
- package/dist/necord-registry.d.ts +24 -24
- package/dist/necord-registry.js +78 -78
- package/dist/necord.constants.d.ts +11 -11
- package/dist/necord.constants.js +15 -15
- package/dist/necord.module.d.ts +18 -18
- package/dist/necord.module.js +123 -123
- package/dist/necord.update.d.ts +21 -21
- package/dist/necord.update.js +326 -325
- package/package.json +1 -1
package/dist/context/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './necord-arguments-host';
|
|
2
|
-
export * from './necord-execution-context';
|
|
3
|
-
export * from './necord-params.factory';
|
|
1
|
+
export * from './necord-arguments-host';
|
|
2
|
+
export * from './necord-execution-context';
|
|
3
|
+
export * from './necord-params.factory';
|
package/dist/context/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./necord-arguments-host"), exports);
|
|
14
|
-
__exportStar(require("./necord-execution-context"), exports);
|
|
15
|
-
__exportStar(require("./necord-params.factory"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./necord-arguments-host"), exports);
|
|
14
|
+
__exportStar(require("./necord-execution-context"), exports);
|
|
15
|
+
__exportStar(require("./necord-params.factory"), exports);
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { ExecutionContextHost } from '@nestjs/core/helpers/execution-context-host';
|
|
2
|
-
import { ArgumentsHost } from '@nestjs/common';
|
|
3
|
-
import { NecordContextType } from './necord-execution-context';
|
|
4
|
-
export interface INecordArgumentsHost extends ArgumentsHost {
|
|
5
|
-
getContext<T = any>(): T;
|
|
6
|
-
getOptions<T = any>(): T;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { ExecutionContextHost } from '@nestjs/core/helpers/execution-context-host';
|
|
2
|
+
import { ArgumentsHost } from '@nestjs/common';
|
|
3
|
+
import { NecordContextType } from './necord-execution-context';
|
|
4
|
+
export interface INecordArgumentsHost extends ArgumentsHost {
|
|
5
|
+
getContext<T = any>(): T;
|
|
6
|
+
getOptions<T = any>(): T;
|
|
7
|
+
getInfo<T = any>(): T;
|
|
8
|
+
}
|
|
9
|
+
export declare class NecordArgumentsHost extends ExecutionContextHost implements INecordArgumentsHost {
|
|
10
|
+
static create(context: ArgumentsHost): NecordArgumentsHost;
|
|
11
|
+
getType<TContext extends string = NecordContextType>(): TContext;
|
|
12
|
+
getContext<T = any>(): T;
|
|
13
|
+
getOptions<T = any>(): T;
|
|
14
|
+
getInfo<T = any>(): T;
|
|
15
|
+
}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NecordArgumentsHost = void 0;
|
|
4
|
-
const execution_context_host_1 = require("@nestjs/core/helpers/execution-context-host");
|
|
5
|
-
class NecordArgumentsHost extends execution_context_host_1.ExecutionContextHost {
|
|
6
|
-
static create(context) {
|
|
7
|
-
const type = context.getType();
|
|
8
|
-
const necContext = new NecordArgumentsHost(context.getArgs());
|
|
9
|
-
necContext.setType(type);
|
|
10
|
-
return necContext;
|
|
11
|
-
}
|
|
12
|
-
getType() {
|
|
13
|
-
return super.getType();
|
|
14
|
-
}
|
|
15
|
-
getContext() {
|
|
16
|
-
return this.getArgByIndex(0);
|
|
17
|
-
}
|
|
18
|
-
getOptions() {
|
|
19
|
-
return this.getArgByIndex(1);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NecordArgumentsHost = void 0;
|
|
4
|
+
const execution_context_host_1 = require("@nestjs/core/helpers/execution-context-host");
|
|
5
|
+
class NecordArgumentsHost extends execution_context_host_1.ExecutionContextHost {
|
|
6
|
+
static create(context) {
|
|
7
|
+
const type = context.getType();
|
|
8
|
+
const necContext = new NecordArgumentsHost(context.getArgs());
|
|
9
|
+
necContext.setType(type);
|
|
10
|
+
return necContext;
|
|
11
|
+
}
|
|
12
|
+
getType() {
|
|
13
|
+
return super.getType();
|
|
14
|
+
}
|
|
15
|
+
getContext() {
|
|
16
|
+
return this.getArgByIndex(0);
|
|
17
|
+
}
|
|
18
|
+
getOptions() {
|
|
19
|
+
return this.getArgByIndex(1);
|
|
20
|
+
}
|
|
21
|
+
getInfo() {
|
|
22
|
+
return this.getArgByIndex(2);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.NecordArgumentsHost = NecordArgumentsHost;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ContextType, ExecutionContext } from '@nestjs/common';
|
|
2
|
-
import { NecordArgumentsHost } from './necord-arguments-host';
|
|
3
|
-
export declare type NecordContextType = 'necord' | ContextType;
|
|
4
|
-
export declare class NecordExecutionContext extends NecordArgumentsHost {
|
|
5
|
-
static create(context: ExecutionContext): NecordExecutionContext;
|
|
6
|
-
}
|
|
1
|
+
import { ContextType, ExecutionContext } from '@nestjs/common';
|
|
2
|
+
import { NecordArgumentsHost } from './necord-arguments-host';
|
|
3
|
+
export declare type NecordContextType = 'necord' | ContextType;
|
|
4
|
+
export declare class NecordExecutionContext extends NecordArgumentsHost {
|
|
5
|
+
static create(context: ExecutionContext): NecordExecutionContext;
|
|
6
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NecordExecutionContext = void 0;
|
|
4
|
-
const necord_arguments_host_1 = require("./necord-arguments-host");
|
|
5
|
-
class NecordExecutionContext extends necord_arguments_host_1.NecordArgumentsHost {
|
|
6
|
-
static create(context) {
|
|
7
|
-
const type = context.getType();
|
|
8
|
-
const necContext = new NecordExecutionContext(context.getArgs(), context.getClass(), context.getHandler());
|
|
9
|
-
necContext.setType(type);
|
|
10
|
-
return necContext;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.NecordExecutionContext = NecordExecutionContext;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NecordExecutionContext = void 0;
|
|
4
|
+
const necord_arguments_host_1 = require("./necord-arguments-host");
|
|
5
|
+
class NecordExecutionContext extends necord_arguments_host_1.NecordArgumentsHost {
|
|
6
|
+
static create(context) {
|
|
7
|
+
const type = context.getType();
|
|
8
|
+
const necContext = new NecordExecutionContext(context.getArgs(), context.getClass(), context.getHandler());
|
|
9
|
+
necContext.setType(type);
|
|
10
|
+
return necContext;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.NecordExecutionContext = NecordExecutionContext;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ParamData } from '@nestjs/common';
|
|
2
|
-
import { ParamsFactory } from '@nestjs/core/helpers/external-context-creator';
|
|
3
|
-
export declare enum NecordParamType {
|
|
4
|
-
CONTEXT = 0,
|
|
5
|
-
OPTIONS = 1,
|
|
6
|
-
INFO = 2
|
|
7
|
-
}
|
|
8
|
-
export declare class NecordParamsFactory implements ParamsFactory {
|
|
9
|
-
exchangeKeyForValue(type: number, data: ParamData, args: unknown): any;
|
|
10
|
-
}
|
|
1
|
+
import { ParamData } from '@nestjs/common';
|
|
2
|
+
import { ParamsFactory } from '@nestjs/core/helpers/external-context-creator';
|
|
3
|
+
export declare enum NecordParamType {
|
|
4
|
+
CONTEXT = 0,
|
|
5
|
+
OPTIONS = 1,
|
|
6
|
+
INFO = 2
|
|
7
|
+
}
|
|
8
|
+
export declare class NecordParamsFactory implements ParamsFactory {
|
|
9
|
+
exchangeKeyForValue(type: number, data: ParamData, args: unknown): any;
|
|
10
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NecordParamsFactory = exports.NecordParamType = void 0;
|
|
4
|
-
var NecordParamType;
|
|
5
|
-
(function (NecordParamType) {
|
|
6
|
-
NecordParamType[NecordParamType["CONTEXT"] = 0] = "CONTEXT";
|
|
7
|
-
NecordParamType[NecordParamType["OPTIONS"] = 1] = "OPTIONS";
|
|
8
|
-
NecordParamType[NecordParamType["INFO"] = 2] = "INFO";
|
|
9
|
-
})(NecordParamType = exports.NecordParamType || (exports.NecordParamType = {}));
|
|
10
|
-
class NecordParamsFactory {
|
|
11
|
-
exchangeKeyForValue(type, data, args) {
|
|
12
|
-
if (!args)
|
|
13
|
-
return null;
|
|
14
|
-
switch (type) {
|
|
15
|
-
case NecordParamType.CONTEXT:
|
|
16
|
-
return args[0];
|
|
17
|
-
case NecordParamType.OPTIONS:
|
|
18
|
-
return data && args[1] ? args[1][data] : args[1];
|
|
19
|
-
case NecordParamType.INFO:
|
|
20
|
-
return args[2];
|
|
21
|
-
default:
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.NecordParamsFactory = NecordParamsFactory;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NecordParamsFactory = exports.NecordParamType = void 0;
|
|
4
|
+
var NecordParamType;
|
|
5
|
+
(function (NecordParamType) {
|
|
6
|
+
NecordParamType[NecordParamType["CONTEXT"] = 0] = "CONTEXT";
|
|
7
|
+
NecordParamType[NecordParamType["OPTIONS"] = 1] = "OPTIONS";
|
|
8
|
+
NecordParamType[NecordParamType["INFO"] = 2] = "INFO";
|
|
9
|
+
})(NecordParamType = exports.NecordParamType || (exports.NecordParamType = {}));
|
|
10
|
+
class NecordParamsFactory {
|
|
11
|
+
exchangeKeyForValue(type, data, args) {
|
|
12
|
+
if (!args)
|
|
13
|
+
return null;
|
|
14
|
+
switch (type) {
|
|
15
|
+
case NecordParamType.CONTEXT:
|
|
16
|
+
return args[0];
|
|
17
|
+
case NecordParamType.OPTIONS:
|
|
18
|
+
return data && args[1] ? args[1][data] : args[1];
|
|
19
|
+
case NecordParamType.INFO:
|
|
20
|
+
return args[2];
|
|
21
|
+
default:
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.NecordParamsFactory = NecordParamsFactory;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Type } from '@nestjs/common';
|
|
2
|
-
import { TransformOptions } from '../interfaces';
|
|
3
|
-
export declare const Autocomplete: (
|
|
1
|
+
import { Type } from '@nestjs/common';
|
|
2
|
+
import { TransformOptions } from '../interfaces';
|
|
3
|
+
export declare const Autocomplete: (...autocompletes: Type<TransformOptions>[]) => MethodDecorator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Autocomplete = void 0;
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
const necord_constants_1 = require("../necord.constants");
|
|
6
|
-
const Autocomplete = (
|
|
7
|
-
exports.Autocomplete = Autocomplete;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Autocomplete = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const necord_constants_1 = require("../necord.constants");
|
|
6
|
+
const Autocomplete = (...autocompletes) => (0, common_1.SetMetadata)(necord_constants_1.AUTOCOMPLETE_METADATA, autocompletes);
|
|
7
|
+
exports.Autocomplete = Autocomplete;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const SlashGroup: (name: string, description: string, defaultPermission?: boolean) => MethodDecorator & ClassDecorator;
|
|
2
|
-
export declare const SlashCommand: (name: string, description: string, defaultPermission?: boolean) => MethodDecorator;
|
|
3
|
-
export declare const TextCommand: (name: string, description?: string) => import("@nestjs/common").CustomDecorator<string>;
|
|
4
|
-
export declare const UserCommand: (name: string) => MethodDecorator;
|
|
5
|
-
export declare const MessageCommand: (name: string) => MethodDecorator;
|
|
1
|
+
export declare const SlashGroup: (name: string, description: string, defaultPermission?: boolean) => MethodDecorator & ClassDecorator;
|
|
2
|
+
export declare const SlashCommand: (name: string, description: string, defaultPermission?: boolean) => MethodDecorator;
|
|
3
|
+
export declare const TextCommand: (name: string, description?: string) => import("@nestjs/common").CustomDecorator<string>;
|
|
4
|
+
export declare const UserCommand: (name: string) => MethodDecorator;
|
|
5
|
+
export declare const MessageCommand: (name: string) => MethodDecorator;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageCommand = exports.UserCommand = exports.TextCommand = exports.SlashCommand = exports.SlashGroup = void 0;
|
|
4
|
-
const necord_constants_1 = require("../necord.constants");
|
|
5
|
-
const common_1 = require("@nestjs/common");
|
|
6
|
-
const SlashGroup = (name, description, defaultPermission = true) => (target, propertyKey, descriptor) => {
|
|
7
|
-
(0, common_1.SetMetadata)(necord_constants_1.GROUP_METADATA, {
|
|
8
|
-
type: !propertyKey
|
|
9
|
-
? 1 /* CHAT_INPUT */
|
|
10
|
-
: 2 /* SUB_COMMAND_GROUP */,
|
|
11
|
-
name,
|
|
12
|
-
description,
|
|
13
|
-
options: [],
|
|
14
|
-
defaultPermission
|
|
15
|
-
})(target, propertyKey, descriptor);
|
|
16
|
-
};
|
|
17
|
-
exports.SlashGroup = SlashGroup;
|
|
18
|
-
const SlashCommand = (name, description, defaultPermission = true) => (0, common_1.SetMetadata)(necord_constants_1.APPLICATION_COMMAND_METADATA, {
|
|
19
|
-
type: 1 /* CHAT_INPUT */,
|
|
20
|
-
name,
|
|
21
|
-
description,
|
|
22
|
-
defaultPermission,
|
|
23
|
-
options: []
|
|
24
|
-
});
|
|
25
|
-
exports.SlashCommand = SlashCommand;
|
|
26
|
-
const TextCommand = (name, description) => (0, common_1.SetMetadata)(necord_constants_1.TEXT_COMMAND_METADATA, {
|
|
27
|
-
name,
|
|
28
|
-
description
|
|
29
|
-
});
|
|
30
|
-
exports.TextCommand = TextCommand;
|
|
31
|
-
const createNecordContextMenu = (type) => (name) => (0, common_1.SetMetadata)(necord_constants_1.APPLICATION_COMMAND_METADATA, {
|
|
32
|
-
type,
|
|
33
|
-
name
|
|
34
|
-
});
|
|
35
|
-
exports.UserCommand = createNecordContextMenu('USER');
|
|
36
|
-
exports.MessageCommand = createNecordContextMenu('MESSAGE');
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageCommand = exports.UserCommand = exports.TextCommand = exports.SlashCommand = exports.SlashGroup = void 0;
|
|
4
|
+
const necord_constants_1 = require("../necord.constants");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const SlashGroup = (name, description, defaultPermission = true) => (target, propertyKey, descriptor) => {
|
|
7
|
+
(0, common_1.SetMetadata)(necord_constants_1.GROUP_METADATA, {
|
|
8
|
+
type: !propertyKey
|
|
9
|
+
? 1 /* CHAT_INPUT */
|
|
10
|
+
: 2 /* SUB_COMMAND_GROUP */,
|
|
11
|
+
name,
|
|
12
|
+
description,
|
|
13
|
+
options: [],
|
|
14
|
+
defaultPermission
|
|
15
|
+
})(target, propertyKey, descriptor);
|
|
16
|
+
};
|
|
17
|
+
exports.SlashGroup = SlashGroup;
|
|
18
|
+
const SlashCommand = (name, description, defaultPermission = true) => (0, common_1.SetMetadata)(necord_constants_1.APPLICATION_COMMAND_METADATA, {
|
|
19
|
+
type: 1 /* CHAT_INPUT */,
|
|
20
|
+
name,
|
|
21
|
+
description,
|
|
22
|
+
defaultPermission,
|
|
23
|
+
options: []
|
|
24
|
+
});
|
|
25
|
+
exports.SlashCommand = SlashCommand;
|
|
26
|
+
const TextCommand = (name, description) => (0, common_1.SetMetadata)(necord_constants_1.TEXT_COMMAND_METADATA, {
|
|
27
|
+
name,
|
|
28
|
+
description
|
|
29
|
+
});
|
|
30
|
+
exports.TextCommand = TextCommand;
|
|
31
|
+
const createNecordContextMenu = (type) => (name) => (0, common_1.SetMetadata)(necord_constants_1.APPLICATION_COMMAND_METADATA, {
|
|
32
|
+
type,
|
|
33
|
+
name
|
|
34
|
+
});
|
|
35
|
+
exports.UserCommand = createNecordContextMenu('USER');
|
|
36
|
+
exports.MessageCommand = createNecordContextMenu('MESSAGE');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const Button: (customId: string) => MethodDecorator;
|
|
2
|
-
export declare const SelectMenu: (customId: string) => MethodDecorator;
|
|
1
|
+
export declare const Button: (customId: string) => MethodDecorator;
|
|
2
|
+
export declare const SelectMenu: (customId: string) => MethodDecorator;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelectMenu = exports.Button = void 0;
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
const necord_constants_1 = require("../necord.constants");
|
|
6
|
-
const createNecordComponentDecorator = (type) => (customId) => (0, common_1.SetMetadata)(necord_constants_1.MESSAGE_COMPONENT_METADATA, { type, customId });
|
|
7
|
-
exports.Button = createNecordComponentDecorator('BUTTON');
|
|
8
|
-
exports.SelectMenu = createNecordComponentDecorator('SELECT_MENU');
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SelectMenu = exports.Button = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const necord_constants_1 = require("../necord.constants");
|
|
6
|
+
const createNecordComponentDecorator = (type) => (customId) => (0, common_1.SetMetadata)(necord_constants_1.MESSAGE_COMPONENT_METADATA, { type, customId });
|
|
7
|
+
exports.Button = createNecordComponentDecorator('BUTTON');
|
|
8
|
+
exports.SelectMenu = createNecordComponentDecorator('SELECT_MENU');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Snowflake } from 'discord.js';
|
|
2
|
-
export declare const Guilds: (guildIds: Snowflake[]) => ClassDecorator & MethodDecorator;
|
|
1
|
+
import { Snowflake } from 'discord.js';
|
|
2
|
+
export declare const Guilds: (guildIds: Snowflake[]) => ClassDecorator & MethodDecorator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Guilds = void 0;
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
const necord_constants_1 = require("../necord.constants");
|
|
6
|
-
const Guilds = (guildIds) => (0, common_1.SetMetadata)(necord_constants_1.GUILDS_METADATA, guildIds);
|
|
7
|
-
exports.Guilds = Guilds;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Guilds = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const necord_constants_1 = require("../necord.constants");
|
|
6
|
+
const Guilds = (guildIds) => (0, common_1.SetMetadata)(necord_constants_1.GUILDS_METADATA, guildIds);
|
|
7
|
+
exports.Guilds = Guilds;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './autocomplete.decorator';
|
|
2
|
-
export * from './commands.decorator';
|
|
3
|
-
export * from './components.decorator';
|
|
4
|
-
export * from './guilds.decorator';
|
|
5
|
-
export * from './listeners.decorator';
|
|
6
|
-
export * from './options.decorator';
|
|
7
|
-
export * from './params.decorator';
|
|
8
|
-
export * from './permissions.decorator';
|
|
1
|
+
export * from './autocomplete.decorator';
|
|
2
|
+
export * from './commands.decorator';
|
|
3
|
+
export * from './components.decorator';
|
|
4
|
+
export * from './guilds.decorator';
|
|
5
|
+
export * from './listeners.decorator';
|
|
6
|
+
export * from './options.decorator';
|
|
7
|
+
export * from './params.decorator';
|
|
8
|
+
export * from './permissions.decorator';
|
package/dist/decorators/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./autocomplete.decorator"), exports);
|
|
14
|
-
__exportStar(require("./commands.decorator"), exports);
|
|
15
|
-
__exportStar(require("./components.decorator"), exports);
|
|
16
|
-
__exportStar(require("./guilds.decorator"), exports);
|
|
17
|
-
__exportStar(require("./listeners.decorator"), exports);
|
|
18
|
-
__exportStar(require("./options.decorator"), exports);
|
|
19
|
-
__exportStar(require("./params.decorator"), exports);
|
|
20
|
-
__exportStar(require("./permissions.decorator"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./autocomplete.decorator"), exports);
|
|
14
|
+
__exportStar(require("./commands.decorator"), exports);
|
|
15
|
+
__exportStar(require("./components.decorator"), exports);
|
|
16
|
+
__exportStar(require("./guilds.decorator"), exports);
|
|
17
|
+
__exportStar(require("./listeners.decorator"), exports);
|
|
18
|
+
__exportStar(require("./options.decorator"), exports);
|
|
19
|
+
__exportStar(require("./params.decorator"), exports);
|
|
20
|
+
__exportStar(require("./permissions.decorator"), exports);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { NecordEvents } from '../interfaces';
|
|
2
|
-
export declare const On: <T extends keyof NecordEvents = keyof NecordEvents>(event: T) => MethodDecorator;
|
|
3
|
-
export declare const Once: <T extends keyof NecordEvents = keyof NecordEvents>(event: T) => MethodDecorator;
|
|
1
|
+
import { NecordEvents } from '../interfaces';
|
|
2
|
+
export declare const On: <T extends keyof NecordEvents = keyof NecordEvents>(event: T) => MethodDecorator;
|
|
3
|
+
export declare const Once: <T extends keyof NecordEvents = keyof NecordEvents>(event: T) => MethodDecorator;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Once = exports.On = void 0;
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
const necord_constants_1 = require("../necord.constants");
|
|
6
|
-
exports.On = createNecordListenerDecorator('on');
|
|
7
|
-
exports.Once = createNecordListenerDecorator('once');
|
|
8
|
-
function createNecordListenerDecorator(type) {
|
|
9
|
-
return (event) => (0, common_1.SetMetadata)(necord_constants_1.LISTENERS_METADATA, {
|
|
10
|
-
type,
|
|
11
|
-
event
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Once = exports.On = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const necord_constants_1 = require("../necord.constants");
|
|
6
|
+
exports.On = createNecordListenerDecorator('on');
|
|
7
|
+
exports.Once = createNecordListenerDecorator('once');
|
|
8
|
+
function createNecordListenerDecorator(type) {
|
|
9
|
+
return (event) => (0, common_1.SetMetadata)(necord_constants_1.LISTENERS_METADATA, {
|
|
10
|
+
type,
|
|
11
|
+
event
|
|
12
|
+
});
|
|
13
|
+
}
|