mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-30 13:47:54 +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 &&
|
||||||
message.text &&
|
message.text &&
|
||||||
message.text[0] === '/' &&
|
message.text[0] === '/' &&
|
||||||
message.text[1].match(/\w/)
|
message.text[1].match(/\w/) &&
|
||||||
|
chat.type !== 'private'
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
await bot.telegram.deleteMessage(chat.id, message.message_id);
|
await bot.telegram.deleteMessage(chat.id, message.message_id);
|
||||||
|
Reference in New Issue
Block a user