]> us-delaporte.pagekite.me Git - matrix-shop-bot.git/blobdiff - app.py
WIP - convert to MCP skill
[matrix-shop-bot.git] / app.py
diff --git a/app.py b/app.py
index c2550efd4d98d7543492577c391dd00ee5ed7172..8e005bea66ce7fac777563b15264be81a803f32d 100644 (file)
--- a/app.py
+++ b/app.py
@@ -1,4 +1,16 @@
-from matrix_shop_bot.bot import get_bot, shop_bot
+import os
+
+import simplematrixbotlib as botlib
+
+from matrix_shop_bot.bot import shop_bot
+
+SERVER = os.environ.get('MATRIX_SERVER')
+BOT_NAME = os.environ.get('MATRIX_BOT')
+BOT_PWD = os.environ.get('MATRIX_BOT_PWD')
+
+def get_bot():
+    creds = botlib.Creds(SERVER, BOT_NAME, BOT_PWD)
+    return botlib.Bot(creds)
 
 bot = get_bot()
 
 
 bot = get_bot()