Update: now can send slides and scoring can be done through buttons - all thanks to Athreya and Zubair
If you want to do this the easy way, just follow this wiki
If you starting afresh, create a server by clicking this link and a bot following this link. You can skip the changes to the server section below. If you are already using the bot and have an existing server, follow the following instructions
- The updated code is in the branch
sendslides
. If you used the commandgit pull
earlier, you should be able to rungit pull
again and use the commandgit checkout sendslides
.- If there are uncommited changes that prevent you from switching branch, commit your changes using
git commit -a -m "my changes"
- If there are uncommited changes that prevent you from switching branch, commit your changes using
- You will now need to install Poppler. If you are using Windows, download the latest binary from this link. At time of writing this, the latest binary was poppler-0.68.0_x86.
- Extract the downloaded the archive file. It should have a directory called bin.
- Add the path of this bin folder to PATH environment variable: for example, if the bin directory is at the location
C:\Program Files\poppler-0.68.0_x86\bin
, add this to the environment variable. To do this, click on the Windows start button, search forEdit the system environment variables
, click on Environment Variables..., under System variables, look for and double-click on PATH, click on New, then addC:\Program Files\poppler-0.68.0_x86\bin
, click OK. - Run
pip install -r requirements.txt
in the home directory of the bot codebase.
- You will need to rename channel
pounce-guesses
toqm-control-panel
- Rename channel
bounce-channel
toslides-and-media
- Create a new channel called
file-upload
and edit its permissions so that everyone can not read messages - If you do not like these names, you can edit quizbot.py and look for the commented line
### Setting up variables to be used for running a Quiz ###
under which the variable names with the channels are defined. Remember that the names of the channels have to match exactly with what's in the code.
- Run
python quizbot.py
- On the discord server, run
!startQuiz <number of teams>
where<number of teams>
is replaced with a number (you should not include the angular brackets). For example,!startQuiz 6
for 6 teams. - Upload a PDF of the quiz to the channel
file-upload
. Note that the PDF must be smaller than 8MB in size (use online PDF compression services if needed). You currently can not use multiple PDFs per quiz. - There should be nothing else on the
file-upload
channel except one lone message with the attached PDF - In any other channel, run the command
!loadFile
- You should now be able to send next slides using the
!n
command. This can be run by a quizmaster/scorer from any channel. - Most likely error: there's a mismatch in channel names.
Any idea to make this bot powerful and easy-to-understand is welcome.