]> us-delaporte.pagekite.me Git - matrix-goal-bot.git/commitdiff
Print goal list after adding a goal
authorEdward Delaporte <edward@delaporte.us>
Wed, 8 Apr 2026 22:49:07 +0000 (17:49 -0500)
committerEdward Delaporte <edward@delaporte.us>
Wed, 8 Apr 2026 22:49:07 +0000 (17:49 -0500)
matrix_goal_bot/bot.py

index 1a2bd2faf6f61b981907d8426d1b434e77fee9e8..417fca92eb93d99afa23238035b8d7e41a436a21 100644 (file)
@@ -107,8 +107,15 @@ class GoalBot():
 
         if match.command('add'):
             new = ' '.join(match.args()[1:])
-            result = self.data.add_goal(new)
-            return [f'Goal added with id {result}']
+            goal_id = self.data.add_goal(new)
+            results = [f'Goal added with id {goal_id}']
+
+            goals = self.data.get_all_goals()
+            results.append('# Goals list...')
+            for goal in goals:
+                results.append(str(goal))
+
+            return results
 
         if match.command('list'):
             logger.debug('Asked to list goals...')