]> apps.delaporte.us Git - matrix-chore-bot.git/commitdiff
Fixup
authorEdward Delaporte <edward@delaporte.us>
Sat, 28 Mar 2026 00:51:55 +0000 (19:51 -0500)
committerEdward Delaporte <edward@delaporte.us>
Sat, 28 Mar 2026 00:51:55 +0000 (19:51 -0500)
matrix_chore_bot/bot.py

index a0a3256d025fc3b21640acadfb56ecf0c5f34f75..62ef475a5b80925a4d3922159dfc49c05e43fcea 100644 (file)
@@ -4,7 +4,9 @@ import os
 
 import simplematrixbotlib as botlib
 
-from .db import Data
+from .db import Data as ChoreData
+
+CHORES = ChoreData()
 
 SERVER = os.environ.get('MATRIX_SERVER')
 BOT_NAME = os.environ.get('MATRIX_BOT')
@@ -18,7 +20,6 @@ logger = logging.getLogger(__name__)
 logging.basicConfig(filename='matrix-chore-bot.log', encoding='utf-8', level=logging.DEBUG)
 logging.getLogger('nio').setLevel(logging.WARNING)
 
-@bot.listener.on_message_event
 async def chore_bot(room, message, bot):
     match = botlib.MessageMatch(room, message, bot, '!chore')
 
@@ -32,6 +33,8 @@ async def chore_bot(room, message, bot):
                 await bot.api.send_text_message(
                     room.room_id, str(line))
         except Exception as ex:
+            raise ex
+
             line = 'Ye cannot get ye flask.'
             await bot.api.send_text_message(
                 room.room_id, str(line))