]> apps.delaporte.us Git - matrix-goal-bot.git/commitdiff
Fewer messages when listing.
authorEdward Delaporte <edward@delaporte.us>
Sat, 6 Jun 2026 19:28:55 +0000 (14:28 -0500)
committerEdward Delaporte <edward@delaporte.us>
Sat, 6 Jun 2026 19:28:55 +0000 (14:28 -0500)
matrix_goal_bot/bot.py

index 6da935199f037714063d15ade222d7652712a9cb..ade650a6fe154ba02033d59a525984dfd3385885 100644 (file)
@@ -90,9 +90,16 @@ class GoalBot():
         if match.prefix():
             try:
                 result_lines = await self._handle_match(match)
+
+                message_lines = []
                 for line in result_lines:
-                    await self.bot.api.send_text_message(
-                        room.room_id, str(line))
+                    message_lines.append(str(line))
+
+                message = '\n'.join(message_lines)
+
+                await self.bot.api.send_text_message(
+                    room.room_id, message)
+
             except Exception as ex:
                 logger.warn(f'Caught exception: {str(ex)}')
                 dumb_msg_idx = len(str(ex)) % len(snark)