import simplematrixbotlib as botlib
-from goals.db import Data, pretty_print
+from .db import Data, pretty_print
SERVER = os.environ.get('MATRIX_SERVER')
BOT_NAME = os.environ.get('GOAL_BOT')
results = pretty_print(vision, goals)
return results
-
if match.command('done'):
task_id = int(match.args()[1])
goal_id = Data().complete_task(task_id)
return [do_goal.__doc__]
-async def goal_bot(room, message):
+async def goal_bot(room, message, bot):
match = botlib.MessageMatch(room, message, bot, PREFIX)
if not match.is_not_from_this_bot() and match.prefix():
await bot.api.send_text_message(
room.room_id, str(line))
except Exception as ex:
- return ['Ye cannot get ye flask.']
-
+ line ='Ye cannot get ye flask.'
+ await bot.api.send_text_message(
+ room.room_id, str(line))
+