X-Git-Url: https://us-delaporte.pagekite.me/gitweb/matrix-fridge-bot.git/blobdiff_plain/f49763fc89fd5263122625962aa022f0c844c346..2f917aaa798317cb369c0226ff059bf83d01fbe6:/matrix_fridge_bot/bot.py?ds=sidebyside diff --git a/matrix_fridge_bot/bot.py b/matrix_fridge_bot/bot.py index 48be800..ff6a5e6 100644 --- a/matrix_fridge_bot/bot.py +++ b/matrix_fridge_bot/bot.py @@ -1,8 +1,8 @@ ''' -Prefix: !fridge +Prefix: .fridge Synax: -!fridge COMMAND ARGS +.fridge COMMAND ARGS Commands: add - add an item @@ -52,9 +52,16 @@ 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)) + 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(