diff --git a/pystark/client.py b/pystark/client.py index f60b9f5..8fea4f4 100644 --- a/pystark/client.py +++ b/pystark/client.py @@ -36,6 +36,8 @@ from pystark.helpers.localization import l10n_setup, get_all_langs from pystark.decorators.command import command_data from pyrogram.errors import ApiIdInvalid, AccessTokenInvalid, AuthKeyDuplicated, AuthKeyUnregistered, UserDeactivated +from sqlalchemy import create_engine + __data__ = {"total_plugins": 0, "all_plugins": {}} @@ -326,7 +328,7 @@ def _load_sql_model(self, name: str): tables = [Users, Bans] for t in tables: if t.__tablename__ == name: - t.__table__.create(checkfirst=True) + t.__table__.create(create_engine(ENV.DATABASE_URL), checkfirst=True) if name == "users": from pystark.database.sql import Database db = Database()