X-Git-Url: https://us-delaporte.pagekite.me/gitweb/matrix-fridge-bot.git/blobdiff_plain/4d9a436f9424c38810c6604831da5cc066564d4a..a04196abe4b5942897db75366398c437187ea000:/matrix_fridge_bot/bot.py diff --git a/matrix_fridge_bot/bot.py b/matrix_fridge_bot/bot.py index 14767f3..90971cf 100644 --- a/matrix_fridge_bot/bot.py +++ b/matrix_fridge_bot/bot.py @@ -52,10 +52,17 @@ class FridgeBot(): 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)) - except Exception as ex: + 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: line = f'Ye flask must be load bearing, or something... {str(ex)}' await self.bot.api.send_text_message( room.room_id, str(line))