It's baseball, not ghostball :)
This commit is contained in:
parent
512b3b05d2
commit
a774d0a0fc
@ -1,7 +1,7 @@
|
|||||||
# Copyright 2022 - c0de <c0de@c0de.dev>
|
# Copyright 2022 - c0de <c0de@c0de.dev>
|
||||||
# Licensed under the MIT License (https://opensource.org/licenses/MIT)
|
# Licensed under the MIT License (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
# Build with: docker build -t ghotballbot:<version> .
|
# Build with: docker build -t baseballbot:<version> .
|
||||||
# Run with: docker run -it
|
# Run with: docker run -it
|
||||||
|
|
||||||
FROM python:3.10-alpine3.16 AS build
|
FROM python:3.10-alpine3.16 AS build
|
||||||
@ -13,6 +13,6 @@ COPY . .
|
|||||||
FROM build AS run
|
FROM build AS run
|
||||||
|
|
||||||
ENV discord_token ""
|
ENV discord_token ""
|
||||||
ENV database_path "/tmp/ghostball.db"
|
ENV database_path "/tmp/baseball.db"
|
||||||
|
|
||||||
CMD ["python", "/app/main.py"]
|
CMD ["python", "/app/main.py"]
|
||||||
|
@ -22,7 +22,7 @@ from peewee import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# User can provide path to database, or it will be put next to main.py
|
# User can provide path to database, or it will be put next to main.py
|
||||||
DATABASE = os.environ.get("database_path", os.getcwd() + "/ghostball.db")
|
DATABASE = os.environ.get("database_path", os.getcwd() + "/baseball.db")
|
||||||
database = SqliteDatabase(DATABASE, pragmas={"foreign_keys": 1})
|
database = SqliteDatabase(DATABASE, pragmas={"foreign_keys": 1})
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# pylint: disable=wrong-import-position
|
# pylint: disable=wrong-import-position
|
||||||
|
|
||||||
"""
|
"""
|
||||||
A discord bot that hosts Ghostball/Braveball.
|
A discord bot that hosts Baseball/Braveball.
|
||||||
|
|
||||||
A discord game where players guess the pitch speed
|
A discord game where players guess the pitch speed
|
||||||
from a fantasy baseball pitcher, and whoever is
|
from a fantasy baseball pitcher, and whoever is
|
||||||
@ -21,7 +21,7 @@ sys.path.append("..")
|
|||||||
from game.manager import GameManager
|
from game.manager import GameManager
|
||||||
|
|
||||||
|
|
||||||
class GhostBallClient(discord.Client):
|
class BaseBallClient(discord.Client):
|
||||||
"""
|
"""
|
||||||
Implementation of a Discord client that will monitor
|
Implementation of a Discord client that will monitor
|
||||||
a channel for messages, and if it recieves a message
|
a channel for messages, and if it recieves a message
|
||||||
|
4
main.py
4
main.py
@ -7,7 +7,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from discord import Intents
|
from discord import Intents
|
||||||
from discord_client.client import GhostBallClient
|
from discord_client.client import BaseBallClient
|
||||||
from database.models import DATABASE, database, create_models
|
from database.models import DATABASE, database, create_models
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
@ -17,5 +17,5 @@ if __name__ == "__main__":
|
|||||||
create_models()
|
create_models()
|
||||||
database.close()
|
database.close()
|
||||||
|
|
||||||
client = GhostBallClient(intents=Intents.all())
|
client = BaseBallClient(intents=Intents.all())
|
||||||
client.run(os.environ.get("discord_token"))
|
client.run(os.environ.get("discord_token"))
|
||||||
|
Loading…
Reference in New Issue
Block a user