]> us-delaporte.pagekite.me Git - matrix-goal-bot.git/blobdiff - bot.py
Add ability to list complete goals
[matrix-goal-bot.git] / bot.py
diff --git a/bot.py b/bot.py
index efc56a5d9ee2c9a7af3a220e6e208ae7318e33e3..3cba5cfe3938d13b5cea379d5fc19db5078f5056 100644 (file)
--- 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
       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
       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()
 
         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
 
             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:])
         if match.command('add-task'):
             goal_id = int(match.args()[1])
             new = ' '.join(match.args()[2:])