From 1752f35074866ff0e5da0817a1340e9eabbefc46 Mon Sep 17 00:00:00 2001 From: Gary Date: Fri, 10 Feb 2023 09:08:29 -0600 Subject: [PATCH] feat: update perm plugin (#72) * feat: make replies ephemeral * refactor: remove unused default from switch case --- TypeScript/requirePermission.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/TypeScript/requirePermission.ts b/TypeScript/requirePermission.ts index c7a4ca4..6ad6f5b 100644 --- a/TypeScript/requirePermission.ts +++ b/TypeScript/requirePermission.ts @@ -26,6 +26,7 @@ function payload(resp?: string) { fetchReply: true, content: resp, allowedMentions: { repliedUser: false }, + ephemeral: true } as const; } @@ -80,11 +81,6 @@ export function requirePermission( return controller.stop(); } return controller.next(); - //*********************************************************************************************************************// - default: - console.warn("Perm Check >>> You didn't specify user or bot."); - ctx.reply(payload("User or Bot was not specified.")); - return controller.stop(); } }); }