]> us-delaporte.pagekite.me Git - matrix-shop-bot.git/commitdiff
Print latest list after each add
authorEdward Delaporte <edward@delaporte.us>
Sun, 29 Mar 2026 17:46:10 +0000 (12:46 -0500)
committerEdward Delaporte <edward@delaporte.us>
Sun, 7 Jun 2026 00:29:20 +0000 (19:29 -0500)
matrix_shop_bot/bot.py

index b1437efd885c7ee06cbb377f804e82da2a33b5a4..4c0a916c148a9072cafa710e67f7ba53e8117dad 100644 (file)
@@ -57,7 +57,10 @@ async def do_shop(match):
     if match.command('add'):
         new = ' '.join(match.args()[1:])
         result = Data().add_item(new)
     if match.command('add'):
         new = ' '.join(match.args()[1:])
         result = Data().add_item(new)
-        return [f'Item added with id {result}']
+        results = [f'Item added with id {result}']
+        for item in Data().get_last_shopping_list():
+            results.append(str(item))
+        return results
 
     if match.command('add-store'):
         new = ' '.join(match.args()[1:])
 
     if match.command('add-store'):
         new = ' '.join(match.args()[1:])