2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-30 13:47:54 +00:00

Fix deletion of code-formatted commands

Fixes deletion of commands formatted as code
This commit is contained in:
David Roizenman
2017-10-11 21:38:58 -04:00
parent f9b572d6f5
commit c5129de463

View File

@@ -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'
) {