- Docker
- Docker-compose
- Clone the repository
- Rename the file
compose.yml.exampletocompose.yml - Change the variables in the file
compose.ymlunder theenvironmentkey - Run the command
docker-compose buildto build the image - Run the command
docker-compose upto start the container
- Python 3.12
- Pip
- Clone the repository
- Create a virtual environment using the command
python -m venv venv - If on Windows, activate the virtual environment using the command
.\venv\Scripts\activate - If on Linux, activate the virtual environment using the command
source venv/bin/activate - Install the dependencies using the command
pip install -r requirements.txt - Setup local environment variables
- Run the command
python main.py
I'd recommend using Docker as it's easier to setup and run the application. If you're familiar with Python, you can use the local setup instead. This is a simple application and doesn't require much setup. It should really only be used on a single guild as it doesn't have any database support.
The following environment variables can be used to configure the bot:
BOT_TOKEN- The Discord bot token obtained from the Discord Developer Portal
CHANNEL_ID- The Discord channel ID where the bot will post daily random cards.CRON_SCHEDULE- When to post the daily random card (in cron format).TZ- Timezone for the cron schedule. Default:America/New_York
All command toggle variables default to true. Set to false to disable specific commands.
ENABLE_RANDOM_COMMAND- Controls the/random-cardcommandENABLE_CARD_INFO_COMMAND- Controls the/card-infocommandENABLE_IMAGE_COMMAND- Controls the/imagecommandENABLE_PRICE_COMMAND- Controls the/pricecommandENABLE_RULINGS_COMMAND- Controls the/rulingscommandENABLE_LEGALITY_COMMAND- Controls the/legalitycommandALLOW_READ_MESSAGE- Controls reading reading user messages for card names and looking up the card on Scryfall
- Can optionally set a automated message to be sent at a specific time to a specific channel (Ommit the variables for CHANNEL_ID and CRON_SCHEDULE to disable this feature)
- Handles double sided cards and posts both images