Skip to content

Commit

Permalink
Merge pull request #1 from justinwritescode/justinwritescode-patch-1
Browse files Browse the repository at this point in the history
Update client.py
  • Loading branch information
justinwritescode authored Mar 7, 2023
2 parents 332621a + 51b0709 commit 2c881f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pystark/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {}}
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 2c881f0

Please sign in to comment.