]> us-delaporte.pagekite.me Git - matrix-shop-bot.git/blobdiff - matrix_shop_bot/bot.py
Update to be less chatty
[matrix-shop-bot.git] / matrix_shop_bot / bot.py
index 9a36c631903c0efe7fd32d10427cbf35c624b180..02c59bc24142b1a58758501e980d877d5f672420 100644 (file)
@@ -185,9 +185,16 @@ async def shop_bot(room, message, bot):
     try:
         if match.prefix():
             result_lines = await do_shop(match)
     try:
         if match.prefix():
             result_lines = await do_shop(match)
+
+            message_lines = []
             for line in result_lines:
             for line in result_lines:
-                await bot.api.send_text_message(
-                    room.room_id, str(line))
+                message_lines.append(str(line))
+
+            message = '\n'.join(message_lines)
+
+            await bot.api.send_text_message(
+                room.room_id, message)
+
     except Exception as ex:
         for line in ['You have:', '    no tea', str(ex)]:
             await bot.api.send_text_message(
     except Exception as ex:
         for line in ['You have:', '    no tea', str(ex)]:
             await bot.api.send_text_message(