X-Git-Url: https://apps.delaporte.us/gitweb/matrix-goal-bot.git/blobdiff_plain/4d1beae9279c96f653466e463349116e10b50c77..33eb98119c73f926a8cd1c7d169dda07e6d66959:/matrix_goal_bot/bot.py diff --git a/matrix_goal_bot/bot.py b/matrix_goal_bot/bot.py index 9e0b878..97f9bd7 100644 --- a/matrix_goal_bot/bot.py +++ b/matrix_goal_bot/bot.py @@ -160,6 +160,16 @@ async def do_goal(match): results = pretty_print(vision, goals) return results + + if match.command('rename'): + goal_id = int(match.args()[1]) + name = ' '.join(match.args()[2:]) + Data().rename_goal(goal_id=goal_id, name=name) + goal,tasks = Data().get_goal(goal_id) + results = pretty_print(goal, tasks) + return results + + # Help text return [do_goal.__doc__] async def goal_bot(room, message, bot):