This is a Polaroid Studios Discord bot that provides features such as displaying in-game levels, entities, badges, frequently asked questions and automated responses.
Python 3.10 or higher is required.
- Install the requirements:
# Linux/macOS
python3 -m pip install -U -r requirements.txt
# Windows
py -3 -m pip install -U -r requirements.txt- Prepare your
.envfile with the following variables:
TOKEN=your discord token
GUTHIB=your GitHub raw URL
TEST_GUILDS=[your test guild IDs]
TICKET_CATEGORY=your ticket category ID
QOTD_CHANNEL=your QOTD channel ID
QOTD_ALLOWED_ROLE_IDS=[allowed role IDs for QOTD]
QOTD_ALLOWED_USER_IDS=[allowed user IDs for QOTD]
To get the GitHub raw URL, follow these steps:
- Go to your GitHub repository and open any file in the
/jsondirectory. - Add
?raw=trueat the end of the URL and navigate to the resulting link. It should look something like this:
https://raw.githubusercontent.com/lexxndr/ps-staff-discord-bot/refs/heads/main/json/badges.json - Remove everything after the last
/in that URL, so it looks like this:
GUTHIB=https://raw.githubusercontent.com/lexxndr/ps-staff-discord-bot/refs/heads/main/json/
If you try to open this URL in your browser, you will get a400: Invalid requesterror, but this is expected and will not affect the bot. - Copy the link and paste it into your
.envfile.
Run the bot with:
python main.pyMake sure your .env file is in the correct location and filled with the appropriate values.
If you encounter issues, please check your setup, Python version, and environment variables.
Most of this code was written by 303 and me. havaka - python police, helped a lot with coding jaymetrics - filled in most of .json files with Apeirophobia information ted - helped with the code and testing