catto.js 1.2.4 → 1.2.6

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 +16 -0
  2. package/package.json +2 -2
package/Bot.js CHANGED
@@ -390,6 +390,22 @@ module.exports = class extends EventEmitter {
390
390
  if (interaction.member) {
391
391
  interaction.member.user = new User(interaction.member.user, this);
392
392
  }
393
+ var realReply = interaction.reply;
394
+ var realDeferReply = interaction.deferReply;
395
+ interaction.reply = function(options) {
396
+ if (typeof options === "object" && options.ephemeral) {
397
+ delete options.ephemeral;
398
+ options.flags = (options.flags || 0) | Discord.MessageFlags.Ephemeral;
399
+ }
400
+ return realReply.apply(this, [options]);
401
+ };
402
+ interaction.deferReply = function(options) {
403
+ if (typeof options === "object" && options.ephemeral) {
404
+ delete options.ephemeral;
405
+ options.flags = (options.flags || 0) | Discord.MessageFlags.Ephemeral;
406
+ }
407
+ return realDeferReply.apply(this, [options]);
408
+ };
393
409
  if (this.options.slashListener && interaction.isChatInputCommand()) {
394
410
  var command = this.slashCommands.get(interaction.commandName);
395
411
  if (command) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catto.js",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Universal module for everything.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -52,6 +52,6 @@
52
52
  "tweetnacl": "^1.0.3"
53
53
  },
54
54
  "devDependencies": {
55
- "jest": "^29.7.0"
55
+ "jest": "^30.0.5"
56
56
  }
57
57
  }