Brozy123 commited on
Commit
207f89b
·
verified ·
1 Parent(s): 06b4d9f

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -3
index.js CHANGED
@@ -788,7 +788,7 @@ async function safeReply(interaction, options) {
788
  }
789
 
790
  async function sendNoPermission(ctx) {
791
- const msg = "❌ No Permission";
792
  try {
793
  if (ctx.isChatInputCommand || ctx.isButton || ctx.isStringSelectMenu || ctx.isUserSelectMenu) {
794
  return await safeReply(ctx, { content: msg, flags: [MessageFlags.Ephemeral] });
@@ -796,8 +796,8 @@ async function sendNoPermission(ctx) {
796
  const reply = await ctx.reply(msg);
797
  setTimeout(() => {
798
  reply.delete().catch(() => { });
799
- ctx.delete().catch(() => { });
800
- }, 5000);
801
  }
802
  } catch (e) { }
803
  }
 
788
  }
789
 
790
  async function sendNoPermission(ctx) {
791
+ const msg = "❌ No Permission\n*(Note: Use Slash Commands `/` for private error messages)*";
792
  try {
793
  if (ctx.isChatInputCommand || ctx.isButton || ctx.isStringSelectMenu || ctx.isUserSelectMenu) {
794
  return await safeReply(ctx, { content: msg, flags: [MessageFlags.Ephemeral] });
 
796
  const reply = await ctx.reply(msg);
797
  setTimeout(() => {
798
  reply.delete().catch(() => { });
799
+ if (ctx.deletable) ctx.delete().catch(() => { });
800
+ }, 3000);
801
  }
802
  } catch (e) { }
803
  }