🤖 Quizbot

Under such original name lies a trivia bot for IRC written in Python. The current version is functional but suffers from a few minor bugs. Unfortunately these days I am not actively participating in any IRC channel (just lurking #python, #django and #gamedev on libera really), so I haven't felt motivated to improve it so far.


From your terminal:

# Clone the git repository:

git clone https://code.pleiades.link/quizbot
cd quizbot

# Create virtual environment using virtualenv

virtualenv env

# Run this to activate if you are using bash

source env/bin/activate

# Run this to activate if you are using fish

source env/bin/activate.fish

# Run this to activate if you are using windows

cd env/Scripts

# Install required libraries

pip install irc

Create a json file in the current bot folder named "config.json" with the IRC server connection information, following this example:

"irc_server": "irc.libera.chat",
"irc_port": "6667",
"irc_nickname": "MyQuizBot",
"irc_channel": "#test"

Finally to start the bot simply run:

python bot.py

The bot should join the channel and be ready to receive commands.


Start a new game by typing in the channel:


After some seconds, the bot will start throwing questions gathered from the-trivia-api.com. Users can provide answers and therefore win points by typing the answer number on the channel. Once the round is over, the bot will list the winner and will accept new game requests.

The number of questions per game can be specified by adding it after the :trivia command, example:

:trivia 5