catto.js 1.4.1 → 1.4.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.
Files changed (2) hide show
  1. package/Bot.js +8 -0
  2. package/package.json +2 -2
package/Bot.js CHANGED
@@ -398,6 +398,7 @@ module.exports = class extends EventEmitter {
398
398
  }
399
399
  var realReply = interaction.reply;
400
400
  var realDeferReply = interaction.deferReply;
401
+ var realEditReply = interaction.editReply;
401
402
  interaction.reply = function(options) {
402
403
  if (typeof options === "object" && options.ephemeral) {
403
404
  delete options.ephemeral;
@@ -412,6 +413,13 @@ module.exports = class extends EventEmitter {
412
413
  }
413
414
  return realDeferReply.apply(this, [options]);
414
415
  };
416
+ interaction.editReply = function(options) {
417
+ if (typeof options === "object" && options.ephemeral) {
418
+ delete options.ephemeral;
419
+ options.flags = (options.flags || 0) | Discord.MessageFlags.Ephemeral;
420
+ }
421
+ return realEditReply.apply(this, [options]);
422
+ };
415
423
  if (this.options.slashListener && interaction.isChatInputCommand()) {
416
424
  var command = this.slashCommands.get(interaction.commandName);
417
425
  if (command) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catto.js",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
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.22.1",
45
+ "discord.js": "^14.24.0",
46
46
  "ejs": "^3.1.10",
47
47
  "express": "^4.19.2",
48
48
  "express-session": "^1.18.0",