forked from test/mau_mau_bot
fix import of database models, botan
This commit is contained in:
parent
b430b26360
commit
63bf9e4035
1 changed files with 5 additions and 1 deletions
|
@ -23,6 +23,7 @@ from telegram.contrib.botan import Botan
|
||||||
|
|
||||||
from game_manager import GameManager
|
from game_manager import GameManager
|
||||||
from database import db
|
from database import db
|
||||||
|
import user_setting # required to generate db mapping
|
||||||
|
|
||||||
db.bind('sqlite', 'uno.sqlite3', create_db=True)
|
db.bind('sqlite', 'uno.sqlite3', create_db=True)
|
||||||
db.generate_mapping(create_tables=True)
|
db.generate_mapping(create_tables=True)
|
||||||
|
@ -33,4 +34,7 @@ with open("config.json","r") as f:
|
||||||
updater = Updater(token=config.get("token"), workers=config.get("workers", 32))
|
updater = Updater(token=config.get("token"), workers=config.get("workers", 32))
|
||||||
dispatcher = updater.dispatcher
|
dispatcher = updater.dispatcher
|
||||||
|
|
||||||
botan = Botan(config.get("botan_token", None))
|
if config.get("botan_token"):
|
||||||
|
botan = Botan(config.get("botan_token"))
|
||||||
|
else:
|
||||||
|
botan = None
|
Loading…
Reference in a new issue