xernerx 3.4.2 → 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.js +1 -1
- 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 +1 -1
|
@@ -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.js
CHANGED
|
@@ -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;
|