From 51b0709bc464a787c8fc0d753450e4a9081f4607 Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 7 Mar 2023 07:54:56 -0500 Subject: [PATCH] Update client.py Changing this to work --- pystark/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()