]> us-delaporte.pagekite.me Git - matrix-shop-bot.git/commitdiff
Update to print list after buying something
authorEdward Delaporte <edward@delaporte.us>
Sun, 5 Apr 2026 15:16:14 +0000 (10:16 -0500)
committerEdward Delaporte <edward@delaporte.us>
Sun, 5 Apr 2026 15:16:14 +0000 (10:16 -0500)
matrix_shop_bot/bot.py

index 1bd27334d35c42ba8383b37e2fe765396332911e..387cf184af205789ef5e4a919701166600df73ed 100644 (file)
@@ -91,7 +91,10 @@ async def do_shop(match):
     if match.command('buy'):
         item_id = ' '.join(match.args()[1:])
         Data().purchase_item(item_id)
-        return ['Success']
+        results = []
+        for item in Data().get_last_shopping_list():
+            results.append(str(item))
+        return results
 
     if match.command('clear'):
         store_id = ' '.join(match.args()[1:])