catto.js 1.4.2 → 1.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/Bot.js +12 -6
- package/package.json +2 -2
package/Bot.js
CHANGED
|
@@ -400,23 +400,29 @@ module.exports = class extends EventEmitter {
|
|
|
400
400
|
var realDeferReply = interaction.deferReply;
|
|
401
401
|
var realEditReply = interaction.editReply;
|
|
402
402
|
interaction.reply = function(options) {
|
|
403
|
-
if (typeof options === "object" && options
|
|
403
|
+
if (typeof options === "object" && "ephemeral" in options) {
|
|
404
|
+
if (options.ephemeral) {
|
|
405
|
+
options.flags = (options.flags || 0) | Discord.MessageFlags.Ephemeral;
|
|
406
|
+
}
|
|
404
407
|
delete options.ephemeral;
|
|
405
|
-
options.flags = (options.flags || 0) | Discord.MessageFlags.Ephemeral;
|
|
406
408
|
}
|
|
407
409
|
return realReply.apply(this, [options]);
|
|
408
410
|
};
|
|
409
411
|
interaction.deferReply = function(options) {
|
|
410
|
-
if (typeof options === "object" && options
|
|
412
|
+
if (typeof options === "object" && "ephemeral" in options) {
|
|
413
|
+
if (options.ephemeral) {
|
|
414
|
+
options.flags = (options.flags || 0) | Discord.MessageFlags.Ephemeral;
|
|
415
|
+
}
|
|
411
416
|
delete options.ephemeral;
|
|
412
|
-
options.flags = (options.flags || 0) | Discord.MessageFlags.Ephemeral;
|
|
413
417
|
}
|
|
414
418
|
return realDeferReply.apply(this, [options]);
|
|
415
419
|
};
|
|
416
420
|
interaction.editReply = function(options) {
|
|
417
|
-
if (typeof options === "object" && options
|
|
421
|
+
if (typeof options === "object" && "ephemeral" in options) {
|
|
422
|
+
if (options.ephemeral) {
|
|
423
|
+
options.flags = (options.flags || 0) | Discord.MessageFlags.Ephemeral;
|
|
424
|
+
}
|
|
418
425
|
delete options.ephemeral;
|
|
419
|
-
options.flags = (options.flags || 0) | Discord.MessageFlags.Ephemeral;
|
|
420
426
|
}
|
|
421
427
|
return realEditReply.apply(this, [options]);
|
|
422
428
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "catto.js",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Universal module for everything.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"body-parser": "^1.20.2",
|
|
44
44
|
"discord-hybrid-sharding": "^3.0.0",
|
|
45
|
-
"discord.js": "^14.24.
|
|
45
|
+
"discord.js": "^14.24.1",
|
|
46
46
|
"ejs": "^3.1.10",
|
|
47
47
|
"express": "^4.19.2",
|
|
48
48
|
"express-session": "^1.18.0",
|