xernerx 4.17.4 → 4.17.5
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/XernerxContextCommand.d.ts +75 -47
- package/dist/build/XernerxContextCommand.js +119 -115
- package/dist/build/XernerxEvent.d.ts +10 -10
- package/dist/build/XernerxEvent.js +17 -17
- package/dist/build/XernerxInhibitor.d.ts +39 -15
- package/dist/build/XernerxInhibitor.js +18 -18
- package/dist/build/XernerxMessageCommand.d.ts +78 -52
- package/dist/build/XernerxMessageCommand.js +118 -114
- package/dist/build/XernerxSlashCommand.d.ts +96 -62
- package/dist/build/XernerxSlashCommand.js +176 -172
- package/dist/client/XernerxClient.d.ts +55 -46
- package/dist/client/XernerxClient.js +83 -88
- package/dist/client/XernerxShardClient.d.ts +14 -14
- package/dist/client/XernerxShardClient.js +61 -47
- package/dist/functions/deploy.js +45 -52
- package/dist/functions/load.js +28 -29
- package/dist/functions/reload.js +23 -24
- package/dist/functions/setPresence.d.ts +1 -1
- package/dist/functions/setPresence.js +17 -16
- package/dist/functions/xernerxUser.js +5 -6
- package/dist/handlers/CommandHandler.d.ts +10 -10
- package/dist/handlers/CommandHandler.js +311 -336
- package/dist/handlers/EventHandler.d.ts +3 -3
- package/dist/handlers/EventHandler.js +48 -21
- package/dist/handlers/ExtensionHandler.d.ts +3 -3
- package/dist/handlers/ExtensionHandler.js +23 -23
- package/dist/handlers/Handler.d.ts +19 -14
- package/dist/handlers/Handler.js +46 -50
- package/dist/handlers/InhibitorHandler.d.ts +3 -3
- package/dist/handlers/InhibitorHandler.js +25 -23
- package/dist/handlers/IntegrationHandler.d.ts +6 -6
- package/dist/handlers/IntegrationHandler.js +20 -20
- package/dist/main.d.ts +28 -21
- package/dist/main.js +28 -21
- package/dist/models/Arguments.d.ts +4 -1
- package/dist/models/Arguments.js +134 -149
- package/dist/models/Cooldowns.d.ts +6 -6
- package/dist/models/Cooldowns.js +25 -29
- package/dist/tools/XernerxError.d.ts +4 -4
- package/dist/tools/XernerxError.js +8 -8
- package/dist/tools/XernerxIntents.d.ts +2 -2
- package/dist/tools/XernerxIntents.js +21 -21
- package/dist/tools/XernerxLog.d.ts +23 -23
- package/dist/tools/XernerxLog.js +125 -110
- package/dist/tools/XernerxText.d.ts +23 -23
- package/dist/tools/XernerxText.js +79 -89
- package/dist/types/extenders.d.ts +55 -47
- package/dist/types/interfaces.d.ts +192 -189
- package/dist/types/types.d.ts +104 -5
- package/dist/utils/ClientUtil.d.ts +12 -9
- package/dist/utils/ClientUtil.js +96 -79
- package/dist/utils/InteractionUtil.d.ts +13 -13
- package/dist/utils/InteractionUtil.js +148 -147
- package/dist/utils/MessageUtil.d.ts +14 -14
- package/dist/utils/MessageUtil.js +162 -161
- package/dist/utils/Util.d.ts +4 -4
- package/dist/utils/Util.js +7 -7
- package/dist/validators/commandValidation.d.ts +4 -1
- package/dist/validators/commandValidation.js +157 -114
- package/dist/validators/inhibitorValidations.d.ts +21 -2
- package/dist/validators/inhibitorValidations.js +39 -39
- package/package.json +3 -3
|
@@ -4,51 +4,79 @@ import { XernerxMessageContextInteraction, XernerxUserContextInteraction, Xerner
|
|
|
4
4
|
import { ContextCommandArguments, ContextCommandOptions } from '../types/interfaces.js';
|
|
5
5
|
import InteractionUtil from '../utils/InteractionUtil.js';
|
|
6
6
|
export default class XernerxContextCommand {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly data: ContextMenuCommandBuilder;
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly type: 'user' | 'message';
|
|
11
|
+
readonly description: string | null | undefined;
|
|
12
|
+
readonly usage: string | null | undefined;
|
|
13
|
+
readonly info: string | null | undefined;
|
|
14
|
+
readonly category: string | null | undefined;
|
|
15
|
+
readonly cooldown: number | null | undefined;
|
|
16
|
+
readonly channel:
|
|
17
|
+
| (
|
|
18
|
+
| 'GuildText'
|
|
19
|
+
| 'DM'
|
|
20
|
+
| 'GuildVoice'
|
|
21
|
+
| 'GroupDM'
|
|
22
|
+
| 'GuildCategory'
|
|
23
|
+
| 'GuildAnnouncement'
|
|
24
|
+
| 'AnnouncementThread'
|
|
25
|
+
| 'PublicThread'
|
|
26
|
+
| 'PrivateThread'
|
|
27
|
+
| 'GuildStageVoice'
|
|
28
|
+
| 'GuildDirectory'
|
|
29
|
+
| 'GuildForum'
|
|
30
|
+
| 'GuildMedia'
|
|
31
|
+
| 'GuildNews'
|
|
32
|
+
| 'GuildNewsThread'
|
|
33
|
+
| 'GuildPublicThread'
|
|
34
|
+
| 'GuildPrivateThread'
|
|
35
|
+
)[]
|
|
36
|
+
| null;
|
|
37
|
+
readonly global: boolean | undefined;
|
|
38
|
+
readonly ignore:
|
|
39
|
+
| {
|
|
40
|
+
owner?: boolean;
|
|
41
|
+
users?: Array<string>;
|
|
42
|
+
channels?: Array<string>;
|
|
43
|
+
guilds?: Array<string>;
|
|
44
|
+
voice?: boolean;
|
|
45
|
+
}
|
|
46
|
+
| undefined;
|
|
47
|
+
readonly strict:
|
|
48
|
+
| {
|
|
49
|
+
owner?: boolean;
|
|
50
|
+
users?: Array<string>;
|
|
51
|
+
channels?: Array<string>;
|
|
52
|
+
guilds?: Array<string>;
|
|
53
|
+
voice?: boolean;
|
|
54
|
+
}
|
|
55
|
+
| undefined;
|
|
56
|
+
readonly permissions:
|
|
57
|
+
| {
|
|
58
|
+
user?: Array<import('../main.js').PermissionNames> | Array<string> | null;
|
|
59
|
+
client?: Array<import('../main.js').PermissionNames> | Array<string> | null;
|
|
60
|
+
dm?: boolean;
|
|
61
|
+
}
|
|
62
|
+
| undefined;
|
|
63
|
+
readonly defer:
|
|
64
|
+
| {
|
|
65
|
+
reply?: boolean;
|
|
66
|
+
ephemeral?: boolean;
|
|
67
|
+
fetchReply?: boolean;
|
|
68
|
+
}
|
|
69
|
+
| undefined;
|
|
70
|
+
readonly filetype: 'ContextCommand';
|
|
71
|
+
readonly filepath: string;
|
|
72
|
+
readonly client: XernerxClientType;
|
|
73
|
+
util: InteractionUtil;
|
|
74
|
+
snowflake: string | null;
|
|
75
|
+
constructor(id: string, options: ContextCommandOptions);
|
|
76
|
+
/**
|
|
77
|
+
* @description the execution of the command
|
|
78
|
+
* @param interaction - Interaction event emitted on command
|
|
79
|
+
* @param args - The arguments parsed with the command, if any
|
|
80
|
+
*/
|
|
81
|
+
exec(interaction: XernerxUserContextInteraction | XernerxMessageContextInteraction, args: ContextCommandArguments<'user' | 'message'>): Promise<any>;
|
|
54
82
|
}
|
|
@@ -3,119 +3,123 @@ import { ContextMenuCommandBuilder } from 'discord.js';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import XernerxLog from '../tools/XernerxLog.js';
|
|
5
5
|
export default class XernerxContextCommand {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
6
|
+
constructor(id, options) {
|
|
7
|
+
this.id = id;
|
|
8
|
+
this.data = new ContextMenuCommandBuilder();
|
|
9
|
+
this.data.setName(options.name);
|
|
10
|
+
this.data.setNameLocalizations(options.nameLocalizations || null);
|
|
11
|
+
this.data.setType(options.type === 'user' ? 2 : 3);
|
|
12
|
+
this.data.setDMPermission(options.permissions?.dm || null);
|
|
13
|
+
options = z
|
|
14
|
+
.object({
|
|
15
|
+
name: z.string(),
|
|
16
|
+
type: z.enum(['user', 'message']),
|
|
17
|
+
description: z.string().or(z.null()).default(null),
|
|
18
|
+
usage: z.string().or(z.null()).default(null),
|
|
19
|
+
info: z.string().or(z.null()).default(null),
|
|
20
|
+
category: z.string().or(z.null()).default(null),
|
|
21
|
+
cooldown: z.number().or(z.null()).default(null),
|
|
22
|
+
global: z.boolean().default(true),
|
|
23
|
+
channel: z
|
|
24
|
+
.array(
|
|
25
|
+
z.enum([
|
|
26
|
+
'GuildText',
|
|
27
|
+
'DM',
|
|
28
|
+
'GuildVoice',
|
|
29
|
+
'GroupDM',
|
|
30
|
+
'GuildCategory',
|
|
31
|
+
'GuildAnnouncement',
|
|
32
|
+
'AnnouncementThread',
|
|
33
|
+
'PublicThread',
|
|
34
|
+
'PrivateThread',
|
|
35
|
+
'GuildStageVoice',
|
|
36
|
+
'GuildDirectory',
|
|
37
|
+
'GuildForum',
|
|
38
|
+
'GuildNews',
|
|
39
|
+
'GuildNewsThread',
|
|
40
|
+
'GuildPublicThread',
|
|
41
|
+
'GuildPrivateThread',
|
|
42
|
+
])
|
|
43
|
+
)
|
|
44
|
+
.or(
|
|
45
|
+
z.enum([
|
|
46
|
+
'GuildText',
|
|
47
|
+
'DM',
|
|
48
|
+
'GuildVoice',
|
|
49
|
+
'GroupDM',
|
|
50
|
+
'GuildCategory',
|
|
51
|
+
'GuildAnnouncement',
|
|
52
|
+
'AnnouncementThread',
|
|
53
|
+
'PublicThread',
|
|
54
|
+
'PrivateThread',
|
|
55
|
+
'GuildStageVoice',
|
|
56
|
+
'GuildDirectory',
|
|
57
|
+
'GuildForum',
|
|
58
|
+
'GuildNews',
|
|
59
|
+
'GuildNewsThread',
|
|
60
|
+
'GuildPublicThread',
|
|
61
|
+
'GuildPrivateThread',
|
|
62
|
+
])
|
|
63
|
+
)
|
|
64
|
+
.or(z.null())
|
|
65
|
+
.default(null),
|
|
66
|
+
ignore: z
|
|
67
|
+
.object({
|
|
68
|
+
owner: z.boolean().default(false),
|
|
69
|
+
users: z.array(z.string()).default([]),
|
|
70
|
+
channels: z.array(z.string()).default([]),
|
|
71
|
+
guilds: z.array(z.string()).default([]),
|
|
72
|
+
voice: z.boolean().default(false),
|
|
73
|
+
})
|
|
74
|
+
.default({}),
|
|
75
|
+
strict: z
|
|
76
|
+
.object({
|
|
77
|
+
owner: z.boolean().default(false),
|
|
78
|
+
users: z.array(z.string()).default([]),
|
|
79
|
+
channels: z.array(z.string()).default([]),
|
|
80
|
+
guilds: z.array(z.string()).default([]),
|
|
81
|
+
voice: z.boolean().default(false),
|
|
82
|
+
})
|
|
83
|
+
.default({}),
|
|
84
|
+
permissions: z
|
|
85
|
+
.object({
|
|
86
|
+
user: z.array(z.string()).or(z.null()).default(null),
|
|
87
|
+
client: z.array(z.string()).or(z.null()).default(null),
|
|
88
|
+
dm: z.boolean().default(true),
|
|
89
|
+
})
|
|
90
|
+
.default({}),
|
|
91
|
+
defer: z
|
|
92
|
+
.object({
|
|
93
|
+
reply: z.boolean().optional(),
|
|
94
|
+
ephemeral: z.boolean().optional(),
|
|
95
|
+
fetch: z.boolean().optional(),
|
|
96
|
+
})
|
|
97
|
+
.default({}),
|
|
98
|
+
})
|
|
99
|
+
.parse(options);
|
|
100
|
+
this.name = options.name;
|
|
101
|
+
this.type = options.type;
|
|
102
|
+
this.description = options.description;
|
|
103
|
+
this.usage = options.usage;
|
|
104
|
+
this.info = options.info;
|
|
105
|
+
this.category = options.category;
|
|
106
|
+
this.cooldown = options.cooldown;
|
|
107
|
+
this.channel = options.channel ? (Array.isArray(options.channel) ? options.channel : [options.channel]) : null;
|
|
108
|
+
this.global = options.global;
|
|
109
|
+
this.ignore = options.ignore;
|
|
110
|
+
this.strict = options.strict;
|
|
111
|
+
this.permissions = options.permissions;
|
|
112
|
+
this.defer = options.defer;
|
|
113
|
+
this.client = this.client;
|
|
114
|
+
this.util = this.util;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* @description the execution of the command
|
|
118
|
+
* @param interaction - Interaction event emitted on command
|
|
119
|
+
* @param args - The arguments parsed with the command, if any
|
|
120
|
+
*/
|
|
121
|
+
async exec(interaction, args) {
|
|
122
|
+
new XernerxLog(this.client).error(`${this.id} doesn't have an execution rule.`);
|
|
123
|
+
return await this.client.emit('commandError', interaction, `${this.id} doesn't have an execution rule.`, this, this.filetype);
|
|
124
|
+
}
|
|
121
125
|
}
|
|
@@ -8,14 +8,14 @@ import { Awaitable, RestEvents } from 'discord.js';
|
|
|
8
8
|
* @param {EventOptions} options - The event options.
|
|
9
9
|
*/
|
|
10
10
|
export default class XernerxEvent<Event extends keyof XernerxClientEvents> {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly name: Event | keyof RestEvents | string;
|
|
13
|
+
readonly emitter?: 'client' | 'process' | 'rest' | string;
|
|
14
|
+
readonly type?: 'discord' | 'node' | string;
|
|
15
|
+
readonly once?: boolean;
|
|
16
|
+
readonly filetype: 'Event';
|
|
17
|
+
readonly filepath: string;
|
|
18
|
+
readonly client: XernerxClientType;
|
|
19
|
+
constructor(id: string, options: XernerxEventOptions);
|
|
20
|
+
run(...args: XernerxClientEvents[Event]): Promise<Awaitable<any>>;
|
|
21
21
|
}
|
|
@@ -7,21 +7,21 @@ import XernerxLog from '../tools/XernerxLog.js';
|
|
|
7
7
|
* @param {EventOptions} options - The event options.
|
|
8
8
|
*/
|
|
9
9
|
export default class XernerxEvent {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
constructor(id, options) {
|
|
11
|
+
this.id = id;
|
|
12
|
+
z.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
emitter: z.string().optional(),
|
|
15
|
+
type: z.string().optional(),
|
|
16
|
+
once: z.boolean().optional(),
|
|
17
|
+
}).parse(options);
|
|
18
|
+
this.name = options.name;
|
|
19
|
+
this.emitter = options.emitter || 'client';
|
|
20
|
+
this.type = options.type || 'discord';
|
|
21
|
+
this.once = options.once || false;
|
|
22
|
+
this.client = this.client;
|
|
23
|
+
}
|
|
24
|
+
async run(...args) {
|
|
25
|
+
return new XernerxLog(this.client).error(`${this.id} doesn't have a run rule.`);
|
|
26
|
+
}
|
|
27
27
|
}
|
|
@@ -11,19 +11,43 @@ import XernerxMessageCommand from '../build/XernerxMessageCommand.js';
|
|
|
11
11
|
* @param {InhibitorOptions} options - The inhibitor options.
|
|
12
12
|
*/
|
|
13
13
|
export default class XernerxInhibitor {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly type: InhibitorType;
|
|
17
|
+
readonly filetype: 'Inhibitor';
|
|
18
|
+
readonly filepath: string;
|
|
19
|
+
readonly client: XernerxClientType;
|
|
20
|
+
constructor(id: string, options: XernerxInhibitorOptions);
|
|
21
|
+
pre(interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>, args: any): void;
|
|
22
|
+
/**
|
|
23
|
+
* @description The check rule
|
|
24
|
+
* @param interaction - The interaction with the inhibitor, can be message and interaction
|
|
25
|
+
* @param args - The arguments parsed with this command
|
|
26
|
+
*/
|
|
27
|
+
check<T extends XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>>(
|
|
28
|
+
interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>,
|
|
29
|
+
args:
|
|
30
|
+
| (T extends XernerxMessage
|
|
31
|
+
? MessageCommandArguments
|
|
32
|
+
: T extends XernerxSlashInteraction
|
|
33
|
+
? SlashCommandArguments
|
|
34
|
+
: T extends XernerxUserContextInteraction
|
|
35
|
+
? ContextCommandArguments<'user' | 'message'>
|
|
36
|
+
: never)
|
|
37
|
+
| null,
|
|
38
|
+
command: XernerxSlashCommand | XernerxMessageCommand | XernerxContextCommand
|
|
39
|
+
): Promise<any>;
|
|
40
|
+
post<T extends XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>>(
|
|
41
|
+
interaction: XernerxMessage | XernerxInteraction<XernerxSlashInteraction | XernerxUserContextInteraction | XernerxMessageContextInteraction>,
|
|
42
|
+
args:
|
|
43
|
+
| (T extends XernerxMessage
|
|
44
|
+
? MessageCommandArguments
|
|
45
|
+
: T extends XernerxSlashInteraction
|
|
46
|
+
? SlashCommandArguments
|
|
47
|
+
: T extends XernerxUserContextInteraction
|
|
48
|
+
? ContextCommandArguments<'user' | 'message'>
|
|
49
|
+
: never)
|
|
50
|
+
| null,
|
|
51
|
+
command: XernerxSlashCommand | XernerxMessageCommand | XernerxContextCommand
|
|
52
|
+
): Promise<any>;
|
|
29
53
|
}
|
|
@@ -6,22 +6,22 @@ import { z } from 'zod';
|
|
|
6
6
|
* @param {InhibitorOptions} options - The inhibitor options.
|
|
7
7
|
*/
|
|
8
8
|
export default class XernerxInhibitor {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
constructor(id, options) {
|
|
10
|
+
this.id = id;
|
|
11
|
+
z.object({
|
|
12
|
+
name: z.string(),
|
|
13
|
+
type: z.string(),
|
|
14
|
+
}).parse(options);
|
|
15
|
+
this.name = options.name;
|
|
16
|
+
this.type = options.type;
|
|
17
|
+
this.client = this.client;
|
|
18
|
+
}
|
|
19
|
+
pre(interaction, args) {}
|
|
20
|
+
/**
|
|
21
|
+
* @description The check rule
|
|
22
|
+
* @param interaction - The interaction with the inhibitor, can be message and interaction
|
|
23
|
+
* @param args - The arguments parsed with this command
|
|
24
|
+
*/
|
|
25
|
+
async check(interaction, args, command) {}
|
|
26
|
+
async post(interaction, args, command) {}
|
|
27
27
|
}
|