mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-30 21:55:17 +00:00
don't try to delete private messages
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user