Created basic version of the bot

This commit is contained in:
StNicolay
2022-10-14 17:48:54 +03:00
parent 7fe7b23a63
commit 865c98ad46
3 changed files with 177 additions and 3 deletions

View File

@ -10,8 +10,6 @@ engine: Engine
def main() -> None:
global engine
load_dotenv("./.env")
engine = database.prepare.get_engine(
host=os.getenv("DB_HOST"),
@ -20,5 +18,5 @@ def main() -> None:
db=os.getenv("DB_NAME"),
) # type: ignore
database.prepare.prepare(engine)
bot_ = bot.create_bot(os.getenv("TG_TOKEN"), con) # type: ignore
bot_ = bot.create_bot(os.getenv("TG_TOKEN"), engine) # type: ignore
bot_.infinity_polling()