38 lines
704 B
Python
38 lines
704 B
Python
import asyncio
|
|
import os
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
from . import (
|
|
account_checks,
|
|
account_parsing,
|
|
bot,
|
|
db,
|
|
decrypted_account,
|
|
encryption,
|
|
generate_password,
|
|
)
|
|
|
|
__all__ = [
|
|
"account_checks",
|
|
"account_parsing",
|
|
"bot",
|
|
"decrypted_account",
|
|
"encryption",
|
|
"db",
|
|
"generate_password",
|
|
]
|
|
|
|
|
|
def main() -> None:
|
|
load_dotenv("./.env")
|
|
engine = db.prepare.get_engine(
|
|
host=os.getenv("DB_HOST"),
|
|
user=os.getenv("DB_USER"),
|
|
passwd=os.getenv("DB_PASS"),
|
|
db=os.getenv("DB_NAME"),
|
|
)
|
|
db.prepare.prepare(engine)
|
|
bot_ = bot.create_bot(os.getenv("TG_TOKEN"), engine)
|
|
asyncio.run(bot_.infinity_polling())
|