From: Edward Delaporte Date: Sun, 29 Mar 2026 17:46:10 +0000 (-0500) Subject: Print latest list after each add X-Git-Url: https://us-delaporte.pagekite.me/gitweb/matrix-shop-bot.git/commitdiff_plain/49680deda5ff2d9e423ce988c36d6de71355e986 Print latest list after each add --- diff --git a/matrix_shop_bot/bot.py b/matrix_shop_bot/bot.py index b1437ef..4c0a916 100644 --- a/matrix_shop_bot/bot.py +++ b/matrix_shop_bot/bot.py @@ -57,7 +57,10 @@ async def do_shop(match): 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:])