mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-30 21:55:17 +00:00
Fix deletion of code-formatted commands
Fixes deletion of commands formatted as code
This commit is contained in:
@@ -12,6 +12,7 @@ const middlewareHandler = async ({ chat, message }, next) => {
|
|||||||
if (
|
if (
|
||||||
message &&
|
message &&
|
||||||
message.text &&
|
message.text &&
|
||||||
|
message.entities[0].type !== 'code' &&
|
||||||
/^\/\w+/.test(message.text) &&
|
/^\/\w+/.test(message.text) &&
|
||||||
chat.type !== 'private'
|
chat.type !== 'private'
|
||||||
) {
|
) {
|
||||||
|
Reference in New Issue
Block a user