xernerx 4.6.0 → 4.6.2
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.
|
@@ -86,9 +86,9 @@ export default class XernerxContextCommand {
|
|
|
86
86
|
.default({}),
|
|
87
87
|
defer: z
|
|
88
88
|
.object({
|
|
89
|
-
reply: z.boolean().
|
|
90
|
-
ephemeral: z.boolean().
|
|
91
|
-
fetch: z.boolean().
|
|
89
|
+
reply: z.boolean().optional(),
|
|
90
|
+
ephemeral: z.boolean().optional(),
|
|
91
|
+
fetch: z.boolean().optional(),
|
|
92
92
|
})
|
|
93
93
|
.default({}),
|
|
94
94
|
})
|
|
@@ -95,9 +95,9 @@ export default class XernerxSlashCommand {
|
|
|
95
95
|
.default({}),
|
|
96
96
|
defer: z
|
|
97
97
|
.object({
|
|
98
|
-
reply: z.boolean().
|
|
99
|
-
ephemeral: z.boolean().
|
|
100
|
-
fetch: z.boolean().
|
|
98
|
+
reply: z.boolean().optional(),
|
|
99
|
+
ephemeral: z.boolean().optional(),
|
|
100
|
+
fetch: z.boolean().optional(),
|
|
101
101
|
})
|
|
102
102
|
.default({}),
|
|
103
103
|
})
|
|
@@ -275,6 +275,11 @@ export default class CommandHandler extends Handler {
|
|
|
275
275
|
}
|
|
276
276
|
async exec(cmd, event, args, type) {
|
|
277
277
|
try {
|
|
278
|
+
if (cmd.filetype !== 'MessageCommand' && (cmd?.defer?.reply ?? this.client.modules.options.slash?.defer?.reply)) {
|
|
279
|
+
await event.deferReply({
|
|
280
|
+
ephemeral: cmd.defer?.ephemeral || this.client.modules.options.slash?.defer?.ephemeral || false,
|
|
281
|
+
});
|
|
282
|
+
}
|
|
278
283
|
if (await commandValidation(event, cmd))
|
|
279
284
|
return;
|
|
280
285
|
if (await inhibitorValidation(event, args, cmd))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xernerx",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.2",
|
|
4
4
|
"description": "A bot framework for discord.js.",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"dbl-sdk": "1.2.0",
|
|
44
|
-
"discord.js": "14.
|
|
44
|
+
"discord.js": "14.13.0",
|
|
45
45
|
"dumfunctions": "2.1.2",
|
|
46
46
|
"xernerx-extension-builder": "0.0.16",
|
|
47
47
|
"zod": "3.22.0"
|