From 64e8c708ee219fc9c2692bccd95e77e29cee52f9 Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Mon, 23 Mar 2026 18:25:15 -0500 Subject: [PATCH 1/1] Add task --- bot.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 0ac709e..731113d 100644 --- a/bot.py +++ b/bot.py @@ -40,7 +40,7 @@ async def do_goal(match): if match.command('add'): new = ' '.join(match.args()[1:]) result = Data().add_goal(new) - return [result] + return [f'Goal added with id {result}'] if match.command('list'): goals = Data().list_goals() @@ -50,8 +50,10 @@ async def do_goal(match): return results if match.command('add-task'): - result = Data().add_task(goal_id=goal_id, name=name) - return [result] + goal_id = int(match.args()[1]) + new = ' '.join(match.args()[2:]) + result = Data().add_task(goal_id=goal_id, name=new) + return [f'Added task with id {result}'] if match.command('print'): goal_id = int(match.args()[1]) -- 2.47.3