txlyre 1 年之前
父节点
当前提交
1b65f6c7d4
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      commands.py

+ 3 - 0
commands.py

@@ -8,6 +8,7 @@ from datetime import datetime
 
 from ujson import dumps
 from tortoise.exceptions import IntegrityError
+from telethon.errors import MessageEmptyError
 from telethon.utils import get_display_name, get_peer_id
 from aiofiles.os import (
   remove,
@@ -458,6 +459,8 @@ async def run_handler(bot, event, command):
     await event.reply(f'```\n{text}```')
   except ValueError:
     await event.reply(text, parse_mode=None)
+  except MessageEmptyError:
+    await event.reply('<Telegram не смог декодировать текст сообщения>')
 
 async def sylvy_handler(bot, event, command):
   if command.argc < 1: