X-Git-Url: https://apps.delaporte.us/gitweb/matrix-goal-bot.git/blobdiff_plain/a82ef10eea38d5cec30ae6e4b2d6a7257735ac53..f35e5f517d4e17c1de54bc2a9a0faa7e77d841b2:/bot.py diff --git a/bot.py b/bot.py index efc56a5..3cba5cf 100644 --- a/bot.py +++ b/bot.py @@ -37,6 +37,7 @@ async def do_goal(match): add-task ID - add a task under the goal specified by ID list - list incomplete goals list-all - list everything + list-done - list completed goals print ID - print a goal and all tasks print-vision ID - print a vision and all goals done ID - mark task done by ID @@ -59,11 +60,20 @@ async def do_goal(match): if match.command('list'): goals = Data().get_all_goals() - results = ['Goals list...'] + results = ['# Goals list...'] for goal in goals: results.append(str(goal)) return results + + if match.command('list-done'): + goals = Data().get_done_goals() + results = ['# Completed Goals...'] + for goal in goals: + results.append(str(goal)) + return results + + if match.command('add-task'): goal_id = int(match.args()[1]) new = ' '.join(match.args()[2:])