]> apps.delaporte.us Git - matrix-shop-bot.git/blobdiff - matrix_shop_bot/bot.py
List purchase history
[matrix-shop-bot.git] / matrix_shop_bot / bot.py
index 46ba972de0b86c0fbaefdd3c9d84b3b0b65d7374..ae65bdc03494b7f6166c79dc40ff607c653dcd47 100644 (file)
@@ -121,6 +121,16 @@ async def do_shop(match):
             results.append(str(item))
         return results
 
+
+    if match.command('past'):
+        store_name = ' '.join(match.args()[1:])
+        items = Data().list_purchases(store_name)
+        results = ['Past purchases at {store_name}']
+        for item in items:
+            results.append(str(item))
+        return results
+    
+
     if match.command('unsorted'):
         items = Data().get_unsorted_list()
         results = ['Items assigned to no store']