BaseballBot/main.py

22 lines
618 B
Python
Raw Permalink 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)
2022-10-25 01:06:50 +00:00
# pylint: disable=missing-module-docstring
2022-09-24 02:40:51 +00:00
import os
2022-10-27 05:04:54 +00:00
from discord import Intents
2022-11-12 07:00:24 +00:00
from discord_client.client import BaseBallClient
2022-10-04 01:08:27 +00:00
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-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()
2022-11-12 07:00:24 +00:00
client = BaseBallClient(intents=Intents.all())
client.run(os.environ.get("discord_token"))