BOT_NAME = os.environ.get('GOAL_BOT')
BOT_PWD = os.environ.get('GOAL_BOT_PWD')
-def get_bot():
- creds = botlib.Creds(SERVER, BOT_NAME, BOT_PWD)
- return botlib.Bot(creds)
DATE_FORMAT = '%Y-%m-%d'
if match.command('task'):
new = ' '.join(match.args()[1:])
- result = Data().quick_add_task(new)
+ goal_id = Data().quick_add_task(new)
goal,tasks = Data().get_goal(goal_id)
results = pretty_print(goal, tasks)
return results
results = pretty_print(goal, tasks)
return results
+ if match.command('remove'):
+ task_id = int(match.args()[1])
+ result = Data().remove_task(task_id)
+ return [result]
+
if match.command('extra.help'):
return [ex_help]