Have you ever been overloaded by information you need to study? Do you need a method that's more interactive and enjoyable to use? Then Citadel is the Discord bot to use. It incorporates the best parts of services such as Quizlet and Kahoot, and combines them into a seamless interface that everyone can use (well, people that have Discord anyway).
Setting up the bot is a fairly simple procedure, though it requires a few steps:
First, you'll need to clone the Git repository for the bot:
git clone 'https://github.com/Python-Code-Jam-2024-Royal-Redshifts/citadel'Next, you'll need to configure the guild ID for the bot in citadel/main.py. Set it to the value of your server's Guild ID which can be found by:
- Right-clicking your server's icon in Discord
- Clicking on
Copy Server ID
Next, you'll need to head to the Discord Developer Portal and click New Application in the top right. Name the bot whatever you'd like; it won't change any future steps.
After creating the bot, go to the Installation tab and scroll down to Default Install Settings. Choose the bot scope and the Manage Messages permission.
Here, you'll also find the Install Link for the bot. Copy and paste the URL into a new browser tab, and add the bot to your server.
Next, go to the Bot tab and select the Reset Token button. Make sure to copy the token down, as you'll need it later on.
You're almost ready to run the bot. Make sure you have Poetry installed, and then run the following:
poetry install --only mainThere are a few environment variables needed to run the bot. Currently, those are:
CITADEL_DISCORD_TOKEN: The Discord token you created above.OPENAI_TOKENAn OpenAI API token to use in API requests.OPENAI_MODEL: The OpenAI model to use (defaults to GPT-4o).OPENAI_BASE: The OpenAI endpoint to use. Can be changed if you'd like to use an OpenAI-compatible service such as Ollama. A higher-parameter model is recommended for the best experience.DB_PATH: The path to the database Citadel should use (defaults to./citadel.db).LOG_LEVELThe amount of logging Citadel should show by default. One ofDEBUG,INFO,WARNING,ERROR, orCRITICAL(defaults toINFO).
These environment variables can be set when running Citadel, or in a file called .env in the root of the Git repository.
After setting up the environment variables, run the following and you'll be ready to go:
poetry run citadelYou can interact with the bot via slash commands, which can be seen by typing / into a Discord message box.
This project wouldn't be possible without the amazing work of the following individuals:
- Joshtdbx: Development of test generation functionality
- danman87: Development of Docker functionality
- hwittenborn: Development of test generation/quiz/Docker functionality
- juseraru: Development of project outline, including implementations for test generation and Docker functionality
- stephen: Original idea for project, helped outline test generation and quiz functionality

