xernerx 3.4.3 → 3.5.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.
Files changed (66) hide show
  1. package/README.md +10 -10
  2. package/dist/build/ContextCommandBuilder.d.ts +60 -42
  3. package/dist/build/ContextCommandBuilder.js +93 -86
  4. package/dist/build/EventBuilder.d.ts +21 -17
  5. package/dist/build/EventBuilder.js +34 -35
  6. package/dist/build/InhibitorBuilder.d.ts +19 -20
  7. package/dist/build/InhibitorBuilder.js +27 -27
  8. package/dist/build/MessageCommandBuilder.d.ts +53 -42
  9. package/dist/build/MessageCommandBuilder.js +90 -78
  10. package/dist/build/SlashCommandBuilder.d.ts +58 -40
  11. package/dist/build/SlashCommandBuilder.js +125 -118
  12. package/dist/client/XernerxClient.d.ts +28 -28
  13. package/dist/client/XernerxClient.js +101 -83
  14. package/dist/handlers/CommandHandler.d.ts +27 -27
  15. package/dist/handlers/CommandHandler.js +42 -42
  16. package/dist/handlers/EventHandler.d.ts +13 -13
  17. package/dist/handlers/EventHandler.js +16 -16
  18. package/dist/handlers/Handler.d.ts +57 -57
  19. package/dist/handlers/Handler.js +250 -250
  20. package/dist/handlers/InhibitorHandler.d.ts +18 -18
  21. package/dist/handlers/InhibitorHandler.js +21 -21
  22. package/dist/main.cjs +2023 -0
  23. package/dist/main.d.ts +30 -30
  24. package/dist/main.js +42 -42
  25. package/dist/models/CommandArguments.d.ts +17 -17
  26. package/dist/models/CommandArguments.js +121 -123
  27. package/dist/models/Events.d.ts +24 -24
  28. package/dist/models/Events.js +294 -304
  29. package/dist/models/Extensions.d.ts +7 -7
  30. package/dist/models/Extensions.js +23 -23
  31. package/dist/tools/XernerxError.d.ts +5 -5
  32. package/dist/tools/XernerxError.js +8 -8
  33. package/dist/tools/package.d.ts +49 -38
  34. package/dist/tools/package.js +48 -41
  35. package/dist/types/enums.d.ts +35 -35
  36. package/dist/types/enums.js +35 -35
  37. package/dist/types/interfaces.d.ts +25 -25
  38. package/dist/types/interfaces.js +1 -1
  39. package/dist/types/options.d.ts +241 -206
  40. package/dist/types/options.js +1 -1
  41. package/dist/types/types.d.ts +34 -32
  42. package/dist/types/types.js +1 -1
  43. package/dist/utils/ClientUtil.d.ts +25 -25
  44. package/dist/utils/ClientUtil.js +222 -218
  45. package/dist/utils/CommandUtil.d.ts +56 -56
  46. package/dist/utils/CommandUtil.js +248 -260
  47. package/dist/validators/CommandValidations.d.ts +7 -7
  48. package/dist/validators/CommandValidations.js +183 -185
  49. package/dist/validators/InhibitorValidations.d.ts +11 -11
  50. package/dist/validators/InhibitorValidations.js +42 -42
  51. package/dist/validators/Shapes.js +1 -0
  52. package/package.json +54 -39
  53. package/dist/build/XContextCommandBuilder.d.ts +0 -40
  54. package/dist/build/XContextCommandBuilder.js +0 -84
  55. package/dist/build/XEventBuilder.d.ts +0 -17
  56. package/dist/build/XEventBuilder.js +0 -35
  57. package/dist/build/XInhibitorBuilder.d.ts +0 -20
  58. package/dist/build/XInhibitorBuilder.js +0 -28
  59. package/dist/build/XMessageCommandBuilder.d.ts +0 -42
  60. package/dist/build/XMessageCommandBuilder.js +0 -80
  61. package/dist/build/XSlashCommandBuilder.d.ts +0 -36
  62. package/dist/build/XSlashCommandBuilder.js +0 -114
  63. package/dist/models/CommandValidations.d.ts +0 -4
  64. package/dist/models/CommandValidations.js +0 -183
  65. package/dist/models/InhibitorValidations.d.ts +0 -12
  66. package/dist/models/InhibitorValidations.js +0 -42
@@ -1,260 +1,248 @@
1
- import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, StringSelectMenuBuilder, } from 'discord.js';
2
- import XernerxError from '../tools/XernerxError.js';
3
- export class MessageCommandUtil {
4
- client;
5
- message;
6
- constructor(client, message) {
7
- this.client = client;
8
- this.message = message;
9
- }
10
- async reply(content) {
11
- if (this.client.cache.messages.has(this.message.id))
12
- var existingMessage = this.client.cache.messages.get(this.message.id);
13
- if (!existingMessage) {
14
- const msg = await this.message.reply(content);
15
- this.message.response = msg.id;
16
- if (this.client.handlerOptions.message?.handleEdits || this.client.handlerOptions.message?.handleDeletes) {
17
- this.client.cache.messages.set(this.message.id, this.message);
18
- setInterval(() => {
19
- this.client.cache.messages.delete(this.message.id);
20
- }, this.client.settings.cooldown?.cache || 300000);
21
- }
22
- return msg;
23
- }
24
- if (existingMessage && this.client.handlerOptions.message?.handleEdits) {
25
- try {
26
- const msg = await this.message.channel.messages.fetch(existingMessage.response);
27
- msg.edit(content);
28
- return msg;
29
- }
30
- catch {
31
- const msg = await this.message.reply(content);
32
- this.message.response = msg.id;
33
- if (this.client.handlerOptions.message?.handleEdits || this.client.handlerOptions.message?.handleDeletes) {
34
- this.client.cache.messages.set(this.message.id, this.message);
35
- setInterval(() => {
36
- this.client.cache.messages.delete(this.message.id);
37
- }, this.client.settings.cooldown?.cache || 300000);
38
- }
39
- }
40
- }
41
- }
42
- async send(content) {
43
- if (this.client.cache.messages.has(this.message.id))
44
- var existingMessage = this.client.cache.messages.get(this.message.id);
45
- if (!existingMessage) {
46
- const msg = await this.message.channel.send(content);
47
- this.message.response = msg.id;
48
- if (this.client.handlerOptions.message?.handleEdits || this.client.handlerOptions.message?.handleDeletes) {
49
- this.client.cache.messages.set(this.message.id, this.message);
50
- setInterval(() => {
51
- this.client.cache.messages.delete(this.message.id);
52
- }, this.client.settings.cooldown?.cache || 300000);
53
- }
54
- return msg;
55
- }
56
- if (existingMessage && this.client.handlerOptions.message?.handleEdits) {
57
- try {
58
- const msg = await this.message.channel.messages.fetch(existingMessage.response);
59
- msg.edit(content);
60
- return msg;
61
- }
62
- catch {
63
- const msg = await this.message.channel.send(content);
64
- this.message.response = msg.id;
65
- if (this.client.handlerOptions.message?.handleEdits || this.client.handlerOptions.message?.handleDeletes) {
66
- this.client.cache.messages.set(this.message.id, this.message);
67
- setInterval(() => {
68
- this.client.cache.messages.delete(this.message.id);
69
- }, this.client.settings.cooldown?.cache || 300000);
70
- }
71
- }
72
- }
73
- }
74
- async defer(time) {
75
- return new Promise((resolve) => setTimeout(resolve, time));
76
- }
77
- getCommands() {
78
- return this.client.commands.message;
79
- }
80
- getCommandName() { }
81
- selectMenuPaginator(embeds, options) { }
82
- buttonPaginator(embeds, options) { }
83
- buttonMenuPaginator(embeds, options) { }
84
- isOwner() {
85
- return this.client.util.isOwner(this.message.author.id);
86
- }
87
- createModal() { }
88
- }
89
- export class InteractionCommandUtil {
90
- client;
91
- interaction;
92
- constructor(client, interaction) {
93
- this.client = client;
94
- this.interaction = interaction;
95
- }
96
- reply(content) {
97
- return this.interaction.replied || this.interaction.deferred
98
- ? this.interaction.editReply(content)
99
- : this.interaction.reply(content);
100
- }
101
- async defer(time) {
102
- return new Promise((resolve) => setTimeout(resolve, time));
103
- }
104
- getCommands() {
105
- if (this.interaction.commandType === 1)
106
- return this.client.commands.slash;
107
- else
108
- return this.client.commands.context;
109
- }
110
- getCommandName() { }
111
- selectMenuPaginator(embeds, options) {
112
- if (!Array.isArray(embeds))
113
- throw new XernerxError(`Expected embeds to be of type array, received ${typeof embeds} instead.`);
114
- if (embeds.length > 25)
115
- throw new XernerxError(`Max select menu length is 25.`);
116
- if (typeof options !== 'object')
117
- options = {};
118
- if (!Array.isArray(options.components))
119
- options.components = [];
120
- if (!options.index) {
121
- options.index = new EmbedBuilder().setTitle('Index').setColor('Random');
122
- for (const embed of embeds) {
123
- options.index.addFields([
124
- {
125
- name: embed.data.title || 'No Name',
126
- value: embed.data.description || 'Page',
127
- inline: embeds.length > 25 / 2 ? true : false,
128
- },
129
- ]);
130
- }
131
- }
132
- if (!options.row) {
133
- options.row = new ActionRowBuilder();
134
- if (!options.id)
135
- options.id = `${this.interaction.id}-menu`;
136
- options.component = new StringSelectMenuBuilder()
137
- .setCustomId(options.id)
138
- .setMaxValues(1)
139
- .setMinValues(1)
140
- .setPlaceholder('Select a page.')
141
- .addOptions({ label: 'index', value: '0' });
142
- embeds.map((embed, i = 0) => {
143
- options?.component?.addOptions({
144
- label: embed.data.title || 'No Name',
145
- description: embed.data.description || `Page ${i}`,
146
- value: String(i + 1),
147
- });
148
- });
149
- options.row.addComponents(options.component);
150
- }
151
- embeds.unshift(options.index);
152
- const content = {
153
- embeds: [options.index],
154
- components: [options.row, ...options.components],
155
- ephemeral: !!options.ephemeral,
156
- };
157
- (options.reply === undefined || options.reply === true
158
- ? this.interaction.util.reply(content)
159
- : this.interaction.channel.send(content)).then(() => {
160
- const collector = this.interaction.channel
161
- .createMessageComponentCollector({
162
- filter: options?.filter,
163
- time: options?.time || 60000,
164
- })
165
- .on('collect', (interaction) => {
166
- if (!interaction.customId.startsWith(this.interaction.id))
167
- return;
168
- interaction.update({
169
- embeds: [embeds[parseInt(interaction.values[0])]],
170
- });
171
- })
172
- .on('end', () => {
173
- this.interaction.editReply({ components: [] });
174
- });
175
- });
176
- }
177
- buttonPaginator(embeds, options) {
178
- if (!Array.isArray(embeds))
179
- throw new XernerxError(`Expected embeds to be of type array, received ${typeof embeds} instead.`);
180
- if (embeds.length <= 0)
181
- throw new XernerxError(`The minimum embeds is 1.`);
182
- if (typeof options !== 'object')
183
- options = {};
184
- if (!Array.isArray(options.components))
185
- options.components = [];
186
- if (!options.row) {
187
- options.row = new ActionRowBuilder();
188
- if (!options.id)
189
- options.id = `${this.interaction.id}-menu`;
190
- }
191
- if (!options.buttons)
192
- options.buttons = ['⏮️', '◀️', '⏹️', '▶️', '⏭️'];
193
- for (const button of options.buttons) {
194
- options.row.addComponents(new ButtonBuilder()
195
- .setCustomId(`${this.interaction.id}-${options.buttons.indexOf(button)}`)
196
- .setEmoji(button)
197
- .setStyle(ButtonStyle.Primary));
198
- }
199
- let embed = embeds[options.index || 0];
200
- const content = {
201
- embeds: [embed],
202
- components: [options.row, ...options.components],
203
- ephemeral: !!options.ephemeral,
204
- };
205
- (options.reply === undefined || options.reply === true
206
- ? this.interaction.util.reply(content)
207
- : this.interaction.channel.send(content)).then((message) => {
208
- const collector = message.channel
209
- .createMessageComponentCollector({
210
- filter: options.filter,
211
- time: options?.time || 60000,
212
- })
213
- .on('collect', (interaction) => {
214
- let stop = false;
215
- if (interaction.customId.startsWith(this.interaction.id)) {
216
- switch (Number(interaction.customId.split(/-/).pop())) {
217
- case 0: {
218
- embed = embeds[0];
219
- break;
220
- }
221
- case 1: {
222
- embed = embeds[embeds.indexOf(embed) >= 1 ? embeds.indexOf(embed) - 1 : 0];
223
- break;
224
- }
225
- case 2: {
226
- collector.stop();
227
- stop = true;
228
- break;
229
- }
230
- case 3: {
231
- embed =
232
- embeds[embeds.indexOf(embed) < embeds.length - 1 ? embeds.indexOf(embed) + 1 : embeds.length - 1];
233
- break;
234
- }
235
- case 4: {
236
- embed = embeds[embeds.length - 1];
237
- break;
238
- }
239
- }
240
- stop
241
- ? interaction.update({
242
- embeds: [embed],
243
- components: [],
244
- })
245
- : interaction.update({
246
- embeds: [embed],
247
- });
248
- }
249
- })
250
- .on('end', () => {
251
- this.interaction.editReply({ components: [] });
252
- });
253
- });
254
- }
255
- buttonMenuPaginator(embeds, options) { }
256
- isOwner() {
257
- return this.client.util.isOwner(this.interaction.user.id);
258
- }
259
- createModal() { }
260
- }
1
+ import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, StringSelectMenuBuilder } from 'discord.js';
2
+ import XernerxError from '../tools/XernerxError.js';
3
+ export class MessageCommandUtil {
4
+ client;
5
+ message;
6
+ constructor(client, message) {
7
+ this.client = client;
8
+ this.message = message;
9
+ }
10
+ async reply(content) {
11
+ if (this.client.cache.messages.has(this.message.id))
12
+ var existingMessage = this.client.cache.messages.get(this.message.id);
13
+ if (!existingMessage) {
14
+ const msg = await this.message.reply(content);
15
+ this.message.response = msg.id;
16
+ if (this.client.handlerOptions.message?.handleEdits || this.client.handlerOptions.message?.handleDeletes) {
17
+ this.client.cache.messages.set(this.message.id, this.message);
18
+ setInterval(() => {
19
+ this.client.cache.messages.delete(this.message.id);
20
+ }, this.client.settings.cooldown?.cache || 300000);
21
+ }
22
+ return msg;
23
+ }
24
+ if (existingMessage && this.client.handlerOptions.message?.handleEdits) {
25
+ try {
26
+ const msg = await this.message.channel.messages.fetch(existingMessage.response);
27
+ msg.edit(content);
28
+ return msg;
29
+ }
30
+ catch {
31
+ const msg = await this.message.reply(content);
32
+ this.message.response = msg.id;
33
+ if (this.client.handlerOptions.message?.handleEdits || this.client.handlerOptions.message?.handleDeletes) {
34
+ this.client.cache.messages.set(this.message.id, this.message);
35
+ setInterval(() => {
36
+ this.client.cache.messages.delete(this.message.id);
37
+ }, this.client.settings.cooldown?.cache || 300000);
38
+ }
39
+ }
40
+ }
41
+ }
42
+ async send(content) {
43
+ if (this.client.cache.messages.has(this.message.id))
44
+ var existingMessage = this.client.cache.messages.get(this.message.id);
45
+ if (!existingMessage) {
46
+ const msg = await this.message.channel.send(content);
47
+ this.message.response = msg.id;
48
+ if (this.client.handlerOptions.message?.handleEdits || this.client.handlerOptions.message?.handleDeletes) {
49
+ this.client.cache.messages.set(this.message.id, this.message);
50
+ setInterval(() => {
51
+ this.client.cache.messages.delete(this.message.id);
52
+ }, this.client.settings.cooldown?.cache || 300000);
53
+ }
54
+ return msg;
55
+ }
56
+ if (existingMessage && this.client.handlerOptions.message?.handleEdits) {
57
+ try {
58
+ const msg = await this.message.channel.messages.fetch(existingMessage.response);
59
+ msg.edit(content);
60
+ return msg;
61
+ }
62
+ catch {
63
+ const msg = await this.message.channel.send(content);
64
+ this.message.response = msg.id;
65
+ if (this.client.handlerOptions.message?.handleEdits || this.client.handlerOptions.message?.handleDeletes) {
66
+ this.client.cache.messages.set(this.message.id, this.message);
67
+ setInterval(() => {
68
+ this.client.cache.messages.delete(this.message.id);
69
+ }, this.client.settings.cooldown?.cache || 300000);
70
+ }
71
+ }
72
+ }
73
+ }
74
+ async defer(time) {
75
+ return new Promise((resolve) => setTimeout(resolve, time));
76
+ }
77
+ getCommands() {
78
+ return this.client.commands.message;
79
+ }
80
+ getCommandName() { }
81
+ selectMenuPaginator(embeds, options) { }
82
+ buttonPaginator(embeds, options) { }
83
+ buttonMenuPaginator(embeds, options) { }
84
+ isOwner() {
85
+ return this.client.util.isOwner(this.message.author.id);
86
+ }
87
+ createModal() { }
88
+ }
89
+ export class InteractionCommandUtil {
90
+ client;
91
+ interaction;
92
+ constructor(client, interaction) {
93
+ this.client = client;
94
+ this.interaction = interaction;
95
+ }
96
+ reply(content) {
97
+ return this.interaction.replied || this.interaction.deferred ? this.interaction.editReply(content) : this.interaction.reply(content);
98
+ }
99
+ async defer(time) {
100
+ return new Promise((resolve) => setTimeout(resolve, time));
101
+ }
102
+ getCommands() {
103
+ if (this.interaction.commandType === 1)
104
+ return this.client.commands.slash;
105
+ else
106
+ return this.client.commands.context;
107
+ }
108
+ getCommandName() { }
109
+ selectMenuPaginator(embeds, options) {
110
+ if (!Array.isArray(embeds))
111
+ throw new XernerxError(`Expected embeds to be of type array, received ${typeof embeds} instead.`);
112
+ if (embeds.length > 25)
113
+ throw new XernerxError(`Max select menu length is 25.`);
114
+ if (typeof options !== 'object')
115
+ options = {};
116
+ if (!Array.isArray(options.components))
117
+ options.components = [];
118
+ if (!options.index) {
119
+ options.index = new EmbedBuilder().setTitle('Index').setColor('Random');
120
+ for (const embed of embeds) {
121
+ options.index.addFields([
122
+ {
123
+ name: embed.data.title || 'No Name',
124
+ value: embed.data.description || 'Page',
125
+ inline: embeds.length > 25 / 2 ? true : false,
126
+ },
127
+ ]);
128
+ }
129
+ }
130
+ if (!options.row) {
131
+ options.row = new ActionRowBuilder();
132
+ if (!options.id)
133
+ options.id = `${this.interaction.id}-menu`;
134
+ options.component = new StringSelectMenuBuilder().setCustomId(options.id).setMaxValues(1).setMinValues(1).setPlaceholder('Select a page.').addOptions({ label: 'index', value: '0' });
135
+ embeds.map((embed, i = 0) => {
136
+ options?.component?.addOptions({
137
+ label: embed.data.title || 'No Name',
138
+ description: embed.data.description || `Page ${i}`,
139
+ value: String(i + 1),
140
+ });
141
+ });
142
+ options.row.addComponents(options.component);
143
+ }
144
+ embeds.unshift(options.index);
145
+ const content = {
146
+ embeds: [options.index],
147
+ components: [options.row, ...options.components],
148
+ ephemeral: !!options.ephemeral,
149
+ };
150
+ (options.reply === undefined || options.reply === true ? this.interaction.util.reply(content) : this.interaction.channel.send(content)).then(() => {
151
+ const collector = this.interaction.channel
152
+ .createMessageComponentCollector({
153
+ filter: options?.filter,
154
+ time: options?.time || 60000,
155
+ })
156
+ .on('collect', (interaction) => {
157
+ if (!interaction.customId.startsWith(this.interaction.id))
158
+ return;
159
+ interaction.update({
160
+ embeds: [embeds[parseInt(interaction.values[0])]],
161
+ });
162
+ })
163
+ .on('end', () => {
164
+ this.interaction.editReply({ components: [] });
165
+ });
166
+ });
167
+ }
168
+ buttonPaginator(embeds, options) {
169
+ if (!Array.isArray(embeds))
170
+ throw new XernerxError(`Expected embeds to be of type array, received ${typeof embeds} instead.`);
171
+ if (embeds.length <= 0)
172
+ throw new XernerxError(`The minimum embeds is 1.`);
173
+ if (typeof options !== 'object')
174
+ options = {};
175
+ if (!Array.isArray(options.components))
176
+ options.components = [];
177
+ if (!options.row) {
178
+ options.row = new ActionRowBuilder();
179
+ if (!options.id)
180
+ options.id = `${this.interaction.id}-menu`;
181
+ }
182
+ if (!options.buttons)
183
+ options.buttons = ['⏮️', '◀️', '⏹️', '▶️', '⏭️'];
184
+ for (const button of options.buttons) {
185
+ options.row.addComponents(new ButtonBuilder()
186
+ .setCustomId(`${this.interaction.id}-${options.buttons.indexOf(button)}`)
187
+ .setEmoji(button)
188
+ .setStyle(ButtonStyle.Primary));
189
+ }
190
+ let embed = embeds[options.index || 0];
191
+ const content = {
192
+ embeds: [embed],
193
+ components: [options.row, ...options.components],
194
+ ephemeral: !!options.ephemeral,
195
+ };
196
+ (options.reply === undefined || options.reply === true ? this.interaction.util.reply(content) : this.interaction.channel.send(content)).then((message) => {
197
+ const collector = message.channel
198
+ .createMessageComponentCollector({
199
+ filter: options.filter,
200
+ time: options?.time || 60000,
201
+ })
202
+ .on('collect', (interaction) => {
203
+ let stop = false;
204
+ if (interaction.customId.startsWith(this.interaction.id)) {
205
+ switch (Number(interaction.customId.split(/-/).pop())) {
206
+ case 0: {
207
+ embed = embeds[0];
208
+ break;
209
+ }
210
+ case 1: {
211
+ embed = embeds[embeds.indexOf(embed) >= 1 ? embeds.indexOf(embed) - 1 : 0];
212
+ break;
213
+ }
214
+ case 2: {
215
+ collector.stop();
216
+ stop = true;
217
+ break;
218
+ }
219
+ case 3: {
220
+ embed = embeds[embeds.indexOf(embed) < embeds.length - 1 ? embeds.indexOf(embed) + 1 : embeds.length - 1];
221
+ break;
222
+ }
223
+ case 4: {
224
+ embed = embeds[embeds.length - 1];
225
+ break;
226
+ }
227
+ }
228
+ stop
229
+ ? interaction.update({
230
+ embeds: [embed],
231
+ components: [],
232
+ })
233
+ : interaction.update({
234
+ embeds: [embed],
235
+ });
236
+ }
237
+ })
238
+ .on('end', () => {
239
+ this.interaction.editReply({ components: [] });
240
+ });
241
+ });
242
+ }
243
+ buttonMenuPaginator(embeds, options) { }
244
+ isOwner() {
245
+ return this.client.util.isOwner(this.interaction.user.id);
246
+ }
247
+ createModal() { }
248
+ }
@@ -1,7 +1,7 @@
1
- import { Interaction } from 'discord.js';
2
- import ContextCommandBuilder from '../build/ContextCommandBuilder.js';
3
- import MessageCommandBuilder from '../build/MessageCommandBuilder.js';
4
- import SlashCommandBuilder from '../build/SlashCommandBuilder.js';
5
- import XernerxClient from '../client/XernerxClient.js';
6
- import { XernerxMessage } from '../types/types.js';
7
- export default function commandValidation(action: XernerxMessage | Interaction, command: SlashCommandBuilder | MessageCommandBuilder | ContextCommandBuilder | any, client: XernerxClient, res?: boolean): boolean;
1
+ import { Interaction } from 'discord.js';
2
+ import ContextCommandBuilder from '../build/ContextCommandBuilder.js';
3
+ import MessageCommandBuilder from '../build/MessageCommandBuilder.js';
4
+ import SlashCommandBuilder from '../build/SlashCommandBuilder.js';
5
+ import XernerxClient from '../client/XernerxClient.js';
6
+ import { XernerxMessage } from '../types/types.js';
7
+ export default function commandValidation(action: XernerxMessage | Interaction, command: SlashCommandBuilder | MessageCommandBuilder | ContextCommandBuilder | any, client: XernerxClient, res?: boolean): boolean;