]> apps.delaporte.us Git - matrix-cadbury.git/commitdiff
Use dedicated credentials
authorEdward Delaporte <edward@delaporte.us>
Sat, 28 Mar 2026 01:11:15 +0000 (20:11 -0500)
committerEdward Delaporte <edward@delaporte.us>
Sat, 28 Mar 2026 01:11:15 +0000 (20:11 -0500)
app.py

diff --git a/app.py b/app.py
index 97b63eec771f40459dac4f96a9f0f43a9944887d..3b802074c010e946a5fdd05cbb115688329a15ca 100644 (file)
--- a/app.py
+++ b/app.py
@@ -1,14 +1,26 @@
+import os
+
+import simplematrixbotlib as botlib
+
 from matrix_goal_bot.bot import get_bot, goal_bot
 from matrix_chore_bot.bot import chore_bot
 
-bot = get_bot()
+SERVER = os.environ.get('MATRIX_SERVER')
+BOT_NAME = os.environ.get('MATRIX_BOT')
+BOT_PWD = os.environ.get('MATRIX_BOT_PWD')
+
+creds = botlib.Creds(SERVER, BOT_NAME, BOT_PWD)
+bot = botlib.Bot(creds)
+
 
 @bot.listener.on_message_event
 async def do_goal_stuff(room, message):
     await goal_bot(room, message, bot)
 
+
 @bot.listener.on_message_event
 async def do_chore_stuff(room, message):
     await chore_bot(room, message, bot)
 
+
 bot.run()