Create database before starting the client
This commit is contained in:
parent
e9d80e5e62
commit
b0c6b8e5bb
@ -10,11 +10,11 @@ from discord_client.client import GhostBallClient
|
|||||||
from database.models import DATABASE, database, create_models
|
from database.models import DATABASE, database, create_models
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
client = GhostBallClient(intents=None)
|
|
||||||
client.run(os.environ.get("discord_token"))
|
|
||||||
|
|
||||||
# Set up the database if we haven't already
|
# Set up the database if we haven't already
|
||||||
if not os.path.exists(DATABASE):
|
if not os.path.exists(DATABASE):
|
||||||
database.connect()
|
database.connect()
|
||||||
create_models()
|
create_models()
|
||||||
database.close()
|
database.close()
|
||||||
|
|
||||||
|
client = GhostBallClient(intents=None)
|
||||||
|
client.run(os.environ.get("discord_token"))
|
||||||
|
Loading…
Reference in New Issue
Block a user