mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-30 05:37:59 +00:00
don't try to delete private messages
This commit is contained in:
parent
4326065f42
commit
cbdac3c48e
@ -17,7 +17,8 @@ const middlewareHandler = async ({ chat, from, message, reply }, next) => {
|
||||
message &&
|
||||
message.text &&
|
||||
message.text[0] === '/' &&
|
||||
message.text[1].match(/\w/)
|
||||
message.text[1].match(/\w/) &&
|
||||
chat.type !== 'private'
|
||||
) {
|
||||
try {
|
||||
await bot.telegram.deleteMessage(chat.id, message.message_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user