catch exceptions and show reaction
This commit is contained in:
parent
d33e0e5a4d
commit
2e3ce19631
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue