A help queue bot for the CS 240 Discord server.
- Python 3.11+
ffmpeginstalled and available on your PATH
Go to https://www.python.org/downloads/. On Windows, enable "Add Python to PATH" during installation.
Open the project folder in VS Code.
Important
Step 3 is optional, but highly recommended
Refer to the internet for help on this one. It's different depending on your system. If you're using powershell, do
python -m venv .venv
.\.venv\Scripts\Activate.ps1
Run the following commands in the VSCode terminal in the root of the project:
python -m pip install --upgrade pip
pip install -r ./src/resources/requirements.txtRun the following command in the VSCode terminal:
ffmpeg -version1. Go to the Discord Developer Portal: https://discord.com/developers/applications
Create a file named .env in the src/resources directory with the following contents:
TOKEN=your-token-herebotapplications.commands
- In Installation Contexts, deselect
User Install - In Install Link, Select
Discord Provided Link - In Default Install Settings, for
Scopesenableapplications.commandsandbot, and forPermissionsselectManage Channels,Manage Messages,Manage Roles, andMove Members
cd src
python bot.pyRun the /setup command in any discord server channel. Assign roles to relevant server members
[!NOTE] The Professor/TA Roles don't have administrator permissions by default, as the bot cannot grant permissisions higher than its own level of access, so you might want to manually go in and mark the Professor Role as Administrator.
/setup should be the only slash command you ever need use, but the following slash commands are also provided in case the buttons are deleted:
/queue: students' help queue buttons in help-queue-chat/ta: TAs' help queue buttons in ta-bot-chat
Note
If the commands don't show up, try restarting your discord client. Sometimes it takes a minute or two to sync the commands.
The bot is now ready to use! When you are available, be sure to join the "Online TAs" voice channel. Use the buttons to deal with helping students, and check the analytics out and analyze them in an excel spreadsheet!
- If no MP3 files are present or you don't have fmpegg installed, it will still run but will not play audio.
- You can customize channel names and messages in
ui/helpers/constants.py. - To run tests, navigate to the root directory and run the following in the terminal:
python -m unittest discover -s tests