BaseballBot/GhostBallBot/main.py

20 lines
564 B
Python
Raw Normal View History

2022-09-24 02:40:51 +00:00
#!/usr/bin/env python3
# Copyright 2022 - c0de <c0de@c0de.dev>
# Licensed under the MIT License (https://opensource.org/licenses/MIT)
import os
from pathlib import Path
2022-10-04 01:08:27 +00:00
from discord_client.client import GhostBallClient
from database.models import DATABASE, database, create_models
2022-09-24 02:40:51 +00:00
2022-10-25 01:00:39 +00:00
if __name__ == "__main__":
2022-10-04 01:08:27 +00:00
client = GhostBallClient(intents=None)
2022-10-25 01:00:39 +00:00
client.run(os.environ.get("discord_token"))
2022-09-24 02:40:51 +00:00
# Set up the database if we haven't already
if not os.path.exists(DATABASE):
database.connect()
create_models()
database.close()