From cfcd165e45cd7cc787a0f7c157ea6f491779e0ea Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Mon, 29 Jun 2026 18:42:30 -0500 Subject: [PATCH] Add more snark --- matrix_chore_bot/bot.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/matrix_chore_bot/bot.py b/matrix_chore_bot/bot.py index ec9c96d..acd45c0 100644 --- a/matrix_chore_bot/bot.py +++ b/matrix_chore_bot/bot.py @@ -25,6 +25,19 @@ from .db import Data as ChoreData logger = logging.getLogger(__name__) logging.getLogger('nio').setLevel(logging.WARNING) +snark = [ + 'Ye cannot get ye flask.', + 'Ye flask must be load bearing, or something...', + '''You have: + no tea + ''', + 'How are you gentlemen?', + 'All your base are belong to us.', + 'You have been eaten by a groo.' +] + + + class ChoreBot(): def __init__(self, matrix_server, bot_name, @@ -55,6 +68,17 @@ class ChoreBot(): for line in result_lines: await self.bot.api.send_text_message( room.room_id, str(line)) + + except Exception as ex: + logger.warn(f'Caught exception: {str(ex)}') + dumb_msg_idx = len(str(ex)) % len(snark) + dumb_msg = snark[dumb_msg_idx] + await self.bot.api.send_text_message( + room.room_id, dumb_msg) + + await self.bot.api.send_text_message( + room.room_id, str(ex)) + except Exception as ex: line = f'Ye flask must be load bearing, or something... {str(ex)}' await self.bot.api.send_text_message( -- 2.47.3