fix admin

This commit is contained in:
Vladless
2024-11-26 20:03:21 +03:00
parent 21e82eed79
commit 9a05ff82e4
+1 -1
View File
@@ -13,7 +13,7 @@ class DeleteMessageMiddleware(BaseMiddleware):
) -> Any:
if isinstance(event, (Message, CallbackQuery)):
if isinstance(event, Message):
if not event.entities[0].type == "bot_command" and event.text == "/start":
if event.entities and event.entities[0].type == "bot_command" and event.text == "/start":
try:
await event.bot.delete_message(event.chat.id, event.message_id - 1)
except Exception: