]>
us-delaporte.pagekite.me Git - matrix-cadbury.git/blob - app.py
3 import simplematrixbotlib
as botlib
5 from matrix_goal_bot
.bot
import get_bot
, goal_bot
6 from matrix_chore_bot
.bot
import chore_bot
8 SERVER
= os
.environ
.get('MATRIX_SERVER')
9 BOT_NAME
= os
.environ
.get('MATRIX_BOT')
10 BOT_PWD
= os
.environ
.get('MATRIX_BOT_PWD')
11 DATA_DIR
= os
.environ
.get('MATRIX_DATA_DIR')
13 creds
= botlib
.Creds(SERVER
, BOT_NAME
, BOT_PWD
)
14 bot
= botlib
.Bot(creds
)
17 @bot.listener.on_message_event
18 async def do_goal_stuff(room
, message
):
19 await goal_bot(room
, message
, bot
, DATA_DIR
)
22 @bot.listener.on_message_event
23 async def do_chore_stuff(room
, message
):
24 await chore_bot(room
, message
, bot
, DATA_DIR
)