From: Edward Delaporte Date: Sun, 5 Apr 2026 15:48:59 +0000 (-0500) Subject: Allow space separated done list X-Git-Url: https://apps.delaporte.us/gitweb/matrix-chore-bot.git/commitdiff_plain/cb9ac2c73d0d36478cecec0f2f6a26ebabbb34af?ds=sidebyside Allow space separated done list --- 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]