Moved code to main func in src

This commit is contained in:
StNicolay 2022-10-05 15:14:32 +03:00
parent e744cba7c8
commit 3cb9c74bac
2 changed files with 14 additions and 4 deletions

View File

@ -1,7 +1,4 @@
import src import src
from dotenv import load_dotenv
load_dotenv("./.env")
def main() -> None: def main() -> None:

View File

@ -1,7 +1,20 @@
import os
import mariadb
from dotenv import load_dotenv
from . import bot, cryptography, database from . import bot, cryptography, database
__all__ = ["bot", "cryptography", "database"] __all__ = ["bot", "cryptography", "database"]
def main() -> None: def main() -> None:
... load_dotenv("./.env")
con = mariadb.connect(
os.getenv("DB_HOST"),
os.getenv("DB_USER"),
os.getenv("DB_PASS"),
os.getenv("DB_NAME"),
)
database.prepare(con)