diff --git a/matrix_gpt/bot/bot_commands.py b/matrix_gpt/bot/bot_commands.py index 11e930c..60367c9 100644 --- a/matrix_gpt/bot/bot_commands.py +++ b/matrix_gpt/bot/bot_commands.py @@ -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: - await self._process_chat() + 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():