Lumina is a modular Discord bot built using Hikari and Lightbulb.
I'm building this bot in my free time as a hobby, though I will try to keep the code clean and nice.
- Modular, you will be able to easily disable specific
plugins
. - Easy to configure via
lumina_config.toml
and.env
.
Lumina is currently W.I.P
Basic
: a simple plugin that includes a command group withping
andlatencies
.Moderation
: a plugin (W.I.P) for moderation commands, event listeners, and utilities.
- Python 3.10+
- Postgresql
- A Discord Bot Token acquired from the discord developer portal.
First, clone the repository (recommended) or download and extract it
In order to clone the repository, we need to ensure that we have Git installed and then we'll run the following in our preferred directory.
# Go to your directory of choice e.g., ~/Documents/Projects
cd my/preferred/directory
# Clone the lumina repository
git clone https://github.com/Forbidden-A/Lumina.git
# Move to the cloned repository
cd Lumina
Now you have Lumina downloaded.
In order to set up the bot, we need to set up some variables and configuration options.
In order to provide our bot with its configuration options we will need to modify or create a file, lumina_config.toml
.
Below is a list of available config options.
⚠️ Warning: Required values MUST be set for the bot to run.
💡 Note: You can make a configuration option pull its value from an envrionment variable, to do so, check out
confspec syntax
.
Variable | Description | Default/Required |
---|---|---|
app.log |
The logging level to use. [DEBUG , INFO , WARN , ERROR ] |
WARN |
discord.token |
The token to login to discord with | Required |
postgresql.user |
The user to login as to the db | user |
postgresql.password |
The database password | Optional |
postgresql.database |
The database to login to and use | lumina |
postgresql.host |
The host to use to connect to the database | localhost |
postgresql.port |
The port with which to connect to the database | 5432 |
For example
lumina_config.toml
[app]
log="INFO"
[discord]
token = "${DISCORD_TOKEN~}"
[postgresql]
user="user"
database="potato"
host="my.cool.host"
port=5432
or
app = { log = "INFO" }
discord = { token = "${DISCORD_TOKEN~}" }
postgresql = { user = "user", database = "potato", host = "my.cool.host", port = 5432 }
We can either set the environment variables manually or create a dotenv file.
While we're still inside the Lumina directory, we'll create a new file called .env
using our preferred method.
For example
touch .env
next we'll open the file using our editor of choice
For example
code .env
then we'll set variables as follows
DISCORD_TOKEN=MY_VERY_SECRET_TOKEN
DATABASE_PASSWORD=MY_SECRET_DATABASE_PASSWORD
Now that we've set our environment variables and configured Lumina, and assuming we have python and our package manager of choice installed we just need to install the dependencies before running the bot.
For example (venv + pip)
- Create the venv
python -m venv .venv
- Enter the venv
.\.venv\Scripts\activate
- Install the dependencies
python -m pip install .
- Create the venv
python3 -m venv .venv
- Enter the venv
source .venv/bin/activate
- install dependencies
python3 -m pip install .
- Now whenever we want to run the bot we enter the venv and then run the following
# Windows
python -m lumina
# Or Linux/macOS
python3 -m lumina
using uv
it's much simpler, we can just run the following
uv run python -m lumina
this should install all of the dependencies and then run the bot.
Below is a list of planned and in-progress features for Lumina:
- ✨ Add more plugins (e.g., Fun, Utility, Music)
- Finish moderation plugin
- Start work on other plugins
- 🛠️ Implement plugin loading/unloading system
- 🧪 Write unit tests
- 💾 Add database migration support
- 🔒 Add proper error handling and logging config
- 🌐 Create web dashboard (optional/future)
- 📚 Write full user and developer documentation
- 🧰 Add CI (e.g., test, lint, typecheck workflows) ?
- 🐳 Add Dockerfile and docker-compose setup