]> apps.delaporte.us Git - matrix-shop-bot.git/blobdiff - app.py
Add debug logs
[matrix-shop-bot.git] / app.py
diff --git a/app.py b/app.py
index c2550efd4d98d7543492577c391dd00ee5ed7172..eab75c7e44dd621002604e461b1d5b7e7a555167 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('NEW_BOT')
+BOT_PWD = os.environ.get('NEW_BOT_PWD')
+
+def get_bot():
+    creds = botlib.Creds(SERVER, BOT_NAME, BOT_PWD)
+    return botlib.Bot(creds)
 
 bot = get_bot()