catch exceptions and show reaction

This commit is contained in:
Cyberes 2023-03-19 21:10:35 -06:00
parent d33e0e5a4d
commit 2e3ce19631
1 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,7 @@ from types import ModuleType
from nio import AsyncClient, MatrixRoom, RoomMessageText
from .chat_functions import process_chat, send_text_to_room
from .chat_functions import process_chat, react_to_event, send_text_to_room
# from .config import Config
from .storage import Storage
@ -69,7 +69,11 @@ class Command:
# if self.command.startswith("help"):
# await self._show_help()
# else:
try:
await self._process_chat()
except Exception:
await react_to_event(self.client, self.room.room_id, self.event.event_id, '')
raise
async def _process_chat(self):
async def inner():