X-Git-Url: https://us-delaporte.pagekite.me/gitweb/matrix-goal-bot.git/blobdiff_plain/64e8c708ee219fc9c2692bccd95e77e29cee52f9..f5b4674001d94e6aadbfbcd074fd730917e6c89d:/bot.py diff --git a/bot.py b/bot.py index 731113d..a6e7f65 100644 --- a/bot.py +++ b/bot.py @@ -68,8 +68,14 @@ async def do_goal(match): else: results.append(f' - [ ] {task}') return results + + if match.command('done'): + goal_id = int(match.args()[1]) + logger.debug(f'Searching for goal {goal_id}...') + result = Data().complete_goal(goal_id) + return [result] - return 'Ye flask must be load bearing or something.' + return __doc__ @bot.listener.on_message_event