From cb9ac2c73d0d36478cecec0f2f6a26ebabbb34af Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Sun, 5 Apr 2026 10:48:59 -0500 Subject: [PATCH] Allow space separated done list --- README.md | 3 +++ matrix_chore_bot/bot.py | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 418e1dc..51347e2 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,6 @@ Prefix: !chore remove - remove a daily chore ``` +## Todo list + +- [x] allow marking multiple items done in a comma separated list (see shop bot add or boal bot done) diff --git a/matrix_chore_bot/bot.py b/matrix_chore_bot/bot.py index c97be63..067c2f9 100644 --- a/matrix_chore_bot/bot.py +++ b/matrix_chore_bot/bot.py @@ -84,9 +84,12 @@ async def handle_chore(match): return [result] if match.command('done'): - chore_id = match.args()[1] - result = CHORES.done(chore_id) - return [result] + ids = match.args()[1:] + results = [] + for chore_id in ids: + result = CHORES.done(chore_id) + results.append(result) + return results if match.command('undo'): chore_id = match.args()[1] -- 2.47.3