xernerx 3.4.1 → 3.4.3
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/build/ContextCommandBuilder.js +0 -2
- package/dist/build/InhibitorBuilder.js +0 -1
- package/dist/build/MessageCommandBuilder.js +0 -2
- package/dist/client/XernerxClient.js +2 -0
- package/dist/handlers/CommandHandler.d.ts +3 -2
- package/dist/handlers/EventHandler.d.ts +3 -2
- package/dist/handlers/Handler.d.ts +2 -2
- package/dist/handlers/Handler.js +1 -1
- package/dist/handlers/InhibitorHandler.d.ts +3 -2
- package/dist/models/CommandArguments.d.ts +1 -1
- package/dist/models/Events.d.ts +3 -3
- package/dist/models/Extensions.d.ts +1 -1
- package/dist/tools/package.d.ts +4 -4
- package/dist/tools/package.js +35 -31
- package/dist/utils/ClientUtil.d.ts +1 -1
- package/dist/utils/CommandUtil.d.ts +4 -4
- package/dist/validators/InhibitorValidations.d.ts +4 -4
- package/package.json +4 -4
|
@@ -72,8 +72,6 @@ export default class ContextCommandBuilder {
|
|
|
72
72
|
this.clientPermissions = options.clientPermissions;
|
|
73
73
|
this.defer = options.defer;
|
|
74
74
|
this.client = XernerxClient;
|
|
75
|
-
this.conditions = this.conditions;
|
|
76
|
-
this.exec = this.exec;
|
|
77
75
|
}
|
|
78
76
|
/**
|
|
79
77
|
* @param {Interaction} interaction - The Discord interaction event data.
|
|
@@ -62,8 +62,6 @@ export default class MessageCommandBuilder {
|
|
|
62
62
|
this.clientPermissions = options.clientPermissions || [];
|
|
63
63
|
this.args = options.args || [];
|
|
64
64
|
this.client = XernerxClient;
|
|
65
|
-
this.conditions = this.conditions;
|
|
66
|
-
this.exec = this.exec;
|
|
67
65
|
}
|
|
68
66
|
/**
|
|
69
67
|
* @param {Message} message - The Discord message event data.
|
|
@@ -6,6 +6,8 @@ import CommandHandler from '../handlers/CommandHandler.js';
|
|
|
6
6
|
import EventHandler from '../handlers/EventHandler.js';
|
|
7
7
|
import InhibitorHandler from '../handlers/InhibitorHandler.js';
|
|
8
8
|
import Extensions from '../models/Extensions.js';
|
|
9
|
+
// TODO - Add logOnError as a setting to the client.
|
|
10
|
+
// TODO - Add commandNotFound as an event to the client.
|
|
9
11
|
/**
|
|
10
12
|
* @description - The Client.
|
|
11
13
|
* @param {DiscordOptions} discordOptions - The options for discord.js.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import XernerxClient from '../client/XernerxClient.js';
|
|
2
|
+
import { Handler } from './Handler.js';
|
|
2
3
|
import { ContextCommandHandlerOptions, MessageCommandHandlerOptions, SlashCommandHandlerOptions } from '../types/options.js';
|
|
3
4
|
/**
|
|
4
5
|
* @description - The command handler.
|
|
5
6
|
* @param {XernerxClient} client - The XernerxClient.
|
|
6
7
|
*/
|
|
7
8
|
export default class CommandHandler {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
client: XernerxClient;
|
|
10
|
+
handler: Handler;
|
|
10
11
|
constructor(client: XernerxClient);
|
|
11
12
|
/**
|
|
12
13
|
* @description - The message command loader.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import XernerxClient from '../client/XernerxClient.js';
|
|
2
2
|
import { EventHandlerOptions } from '../types/options.js';
|
|
3
|
+
import { Handler } from './Handler.js';
|
|
3
4
|
export default class EventHandler {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
client: XernerxClient;
|
|
6
|
+
handler: Handler;
|
|
6
7
|
constructor(client: XernerxClient);
|
|
7
8
|
/**
|
|
8
9
|
* @description - The event loader
|
|
@@ -6,8 +6,8 @@ import { ContextCommandHandlerOptions, EventHandlerOptions, InhibitorHandlerOpti
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class Handler {
|
|
8
8
|
private client;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
commands: object[];
|
|
10
|
+
readyTimestamp: number;
|
|
11
11
|
constructor(client: XernerxClient);
|
|
12
12
|
/**
|
|
13
13
|
* @description - The loader for the message commands.
|
package/dist/handlers/Handler.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import XernerxClient from '../client/XernerxClient.js';
|
|
2
2
|
import { InhibitorHandlerOptions } from '../types/options.js';
|
|
3
|
+
import { Handler } from './Handler.js';
|
|
3
4
|
/**
|
|
4
5
|
* @description - Inhibitor loader.
|
|
5
6
|
* @param {XernerxClient} client - The XernerxClient.
|
|
6
7
|
*/
|
|
7
8
|
export default class InhibitorHandler {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
client: XernerxClient;
|
|
10
|
+
handler: Handler;
|
|
10
11
|
constructor(client: XernerxClient);
|
|
11
12
|
/**
|
|
12
13
|
* @description - The loader for all inhibitors.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import MessageCommandBuilder from '../build/MessageCommandBuilder.js';
|
|
2
2
|
import { XernerxInteraction, XernerxMessage } from '../types/types.js';
|
|
3
3
|
export declare class InteractionArguments {
|
|
4
|
-
|
|
4
|
+
interaction: XernerxInteraction;
|
|
5
5
|
constructor(interaction: XernerxInteraction);
|
|
6
6
|
group(): string | undefined;
|
|
7
7
|
subcommand(): string | undefined;
|
package/dist/models/Events.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import XernerxClient from '../client/XernerxClient.js';
|
|
2
2
|
export declare class MessageCommandEvents {
|
|
3
|
-
|
|
3
|
+
client: XernerxClient;
|
|
4
4
|
constructor(client: XernerxClient);
|
|
5
5
|
messageCreate(): void;
|
|
6
6
|
messageUpdate(): void;
|
|
7
7
|
messageDelete(): void;
|
|
8
8
|
}
|
|
9
9
|
export declare class SlashCommandEvents {
|
|
10
|
-
|
|
10
|
+
client: XernerxClient;
|
|
11
11
|
constructor(client: XernerxClient);
|
|
12
12
|
slashCreate(): void;
|
|
13
13
|
}
|
|
14
14
|
export declare class ContextCommandEvents {
|
|
15
|
-
|
|
15
|
+
client: XernerxClient;
|
|
16
16
|
constructor(client: XernerxClient);
|
|
17
17
|
contextCreate(): void;
|
|
18
18
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XernerxExtensionBuilder from 'xernerx-extension-builder';
|
|
2
2
|
import XernerxClient from '../client/XernerxClient.js';
|
|
3
3
|
export default class Extensions {
|
|
4
|
-
|
|
4
|
+
client: XernerxClient;
|
|
5
5
|
constructor(client: XernerxClient);
|
|
6
6
|
load(extensions: Array<XernerxExtensionBuilder>, logging?: boolean): Promise<void>;
|
|
7
7
|
}
|
package/dist/tools/package.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ declare const _default: {
|
|
|
16
16
|
major: string;
|
|
17
17
|
site: string;
|
|
18
18
|
commit: string;
|
|
19
|
-
|
|
19
|
+
build: string;
|
|
20
20
|
};
|
|
21
21
|
repository: {
|
|
22
22
|
type: string;
|
|
@@ -26,10 +26,10 @@ declare const _default: {
|
|
|
26
26
|
url: string;
|
|
27
27
|
};
|
|
28
28
|
dependencies: {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
"@sapphire/shapeshift": string;
|
|
30
|
+
"discord.js": string;
|
|
31
31
|
dumfunctions: string;
|
|
32
|
-
|
|
32
|
+
"xernerx-extension-builder": string;
|
|
33
33
|
};
|
|
34
34
|
devDependencies: {
|
|
35
35
|
typescript: string;
|
package/dist/tools/package.js
CHANGED
|
@@ -1,37 +1,41 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
name:
|
|
3
|
-
version:
|
|
4
|
-
type:
|
|
5
|
-
description:
|
|
6
|
-
main:
|
|
7
|
-
keywords: [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
2
|
+
"name": "xernerx",
|
|
3
|
+
"version": "3.4.3",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "A bot framework for discord.js.",
|
|
6
|
+
"main": "dist/main.js",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"discord.js",
|
|
9
|
+
"discord",
|
|
10
|
+
"framework"
|
|
11
|
+
],
|
|
12
|
+
"author": "Dummi",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"homepage": "https://xernerx.github.io/xernerx/home.html",
|
|
15
|
+
"packageManager": "npm@8.5.5",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"start": "npm i && npm fund && npm audit fix --force && npm link && tsc -w",
|
|
18
|
+
"patch": "npm run build && tsc && git add . && npm run commit && npm version patch && npm publish && git push",
|
|
19
|
+
"minor": "npm run build && tsc && git add . && npm run commit && npm version minor && npm publish && git push",
|
|
20
|
+
"major": "npm run build && tsc && git add . && npm run commit && npm version major && npm publish && git push",
|
|
21
|
+
"site": "git add docs && npm run commit && git push",
|
|
22
|
+
"commit": "node ../.scripts/commit.js",
|
|
23
|
+
"build": "node ../.scripts/rewritePackage.js"
|
|
20
24
|
},
|
|
21
|
-
repository: {
|
|
22
|
-
type:
|
|
23
|
-
url:
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/xernerx/xernerx.git"
|
|
24
28
|
},
|
|
25
|
-
bugs: {
|
|
26
|
-
url:
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/xernerx/xernerx/issues"
|
|
27
31
|
},
|
|
28
|
-
dependencies: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
dumfunctions:
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
devDependencies: {
|
|
35
|
-
typescript: '^4.9.4',
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@sapphire/shapeshift": "^3.8.1",
|
|
34
|
+
"discord.js": "^14.7.0",
|
|
35
|
+
"dumfunctions": "^2.0.0",
|
|
36
|
+
"xernerx-extension-builder": "^0.0.2"
|
|
36
37
|
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"typescript": "^4.9.4"
|
|
40
|
+
}
|
|
37
41
|
};
|
|
@@ -25,8 +25,8 @@ interface ButtonOptions {
|
|
|
25
25
|
ephemeral?: boolean;
|
|
26
26
|
}
|
|
27
27
|
export declare class MessageCommandUtil {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
client: XernerxClient;
|
|
29
|
+
message: XernerxMessage;
|
|
30
30
|
constructor(client: XernerxClient, message: Message & XernerxMessage);
|
|
31
31
|
reply(content: MessagePayload | string): Promise<Message<boolean> | undefined>;
|
|
32
32
|
send(content: MessagePayload | string): Promise<Message<true> | Message<false> | undefined>;
|
|
@@ -40,8 +40,8 @@ export declare class MessageCommandUtil {
|
|
|
40
40
|
createModal(): void;
|
|
41
41
|
}
|
|
42
42
|
export declare class InteractionCommandUtil {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
client: XernerxClient;
|
|
44
|
+
interaction: any;
|
|
45
45
|
constructor(client: XernerxClient, interaction: Interaction);
|
|
46
46
|
reply(content: MessagePayload | string): any;
|
|
47
47
|
defer(time: number): Promise<unknown>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import XernerxClient from '../client/XernerxClient.js';
|
|
2
2
|
import { XernerxInteraction, XernerxMessage } from '../types/types.js';
|
|
3
3
|
export declare class InhibitorValidation {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
client: XernerxClient;
|
|
5
|
+
action: XernerxMessage | XernerxInteraction;
|
|
6
|
+
command: string;
|
|
7
|
+
inhibited: Record<string, string | void>;
|
|
8
8
|
constructor(client: XernerxClient, action: XernerxMessage | XernerxInteraction, command: string);
|
|
9
9
|
inhibit(): Promise<Record<string, string | void> | undefined>;
|
|
10
10
|
private args;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xernerx",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A bot framework for discord.js.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"packageManager": "npm@8.5.5",
|
|
16
16
|
"scripts": {
|
|
17
17
|
"start": "npm i && npm fund && npm audit fix --force && npm link && tsc -w",
|
|
18
|
-
"patch": "npm run build && git add . && npm run commit && npm version patch && npm publish && git push",
|
|
19
|
-
"minor": "npm run build && git add . && npm run commit && npm version minor && npm publish && git push",
|
|
20
|
-
"major": "npm run build && git add . && npm run commit && npm version major && npm publish && git push",
|
|
18
|
+
"patch": "npm run build && tsc && git add . && npm run commit && npm version patch && npm publish && git push",
|
|
19
|
+
"minor": "npm run build && tsc && git add . && npm run commit && npm version minor && npm publish && git push",
|
|
20
|
+
"major": "npm run build && tsc && git add . && npm run commit && npm version major && npm publish && git push",
|
|
21
21
|
"site": "git add docs && npm run commit && git push",
|
|
22
22
|
"commit": "node ../.scripts/commit.js",
|
|
23
23
|
"build": "node ../.scripts/rewritePackage.js"
|