From c5129de4638409d0c5108e4be6952179c807f2e4 Mon Sep 17 00:00:00 2001 From: David Roizenman Date: Wed, 11 Oct 2017 21:38:58 -0400 Subject: [PATCH] Fix deletion of code-formatted commands Fixes deletion of commands formatted as code --- handlers/middlewares/removeCommands.js | 1 + 1 file changed, 1 insertion(+) diff --git a/handlers/middlewares/removeCommands.js b/handlers/middlewares/removeCommands.js index 61b2572..cf980c5 100644 --- a/handlers/middlewares/removeCommands.js +++ b/handlers/middlewares/removeCommands.js @@ -12,6 +12,7 @@ const middlewareHandler = async ({ chat, message }, next) => { if ( message && message.text && + message.entities[0].type !== 'code' && /^\/\w+/.test(message.text) && chat.type !== 'private' ) {