X-Git-Url: https://us-delaporte.pagekite.me/gitweb/matrix-chore-bot.git/blobdiff_plain/821744728a97987fab0836669d588b53236ebc03..e06e2bdabbc3aa27b6f6506ff905e299f6eea348:/matrix_chore_bot/bot.py?ds=inline diff --git a/matrix_chore_bot/bot.py b/matrix_chore_bot/bot.py index a0a3256..3130d35 100644 --- a/matrix_chore_bot/bot.py +++ b/matrix_chore_bot/bot.py @@ -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,7 +33,7 @@ async def chore_bot(room, message, bot): await bot.api.send_text_message( room.room_id, str(line)) except Exception as ex: - line = 'Ye cannot get ye flask.' + line = 'Ye flask must be load bearing, or something...' await bot.api.send_text_message( room.room_id, str(line))