]> apps.delaporte.us Git - matrix-goal-bot.git/commitdiff
Add snark
authorEdward Delaporte <edward@delaporte.us>
Wed, 8 Apr 2026 22:46:41 +0000 (17:46 -0500)
committerEdward Delaporte <edward@delaporte.us>
Wed, 8 Apr 2026 22:46:41 +0000 (17:46 -0500)
matrix_goal_bot/bot.py

index 9e15be4dbe526984c587bf5cfa5cd23563577d6a..1a2bd2faf6f61b981907d8426d1b434e77fee9e8 100644 (file)
@@ -89,6 +89,11 @@ class GoalBot():
                         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))