Rhidium is built out of love for Discord bot development, and has 1 primary goal: to make your life easier. Whether you're just getting started or a seasoned developer, Rhidium is designed to simplify your workflow and help you create bots you can be proud of.
Rhidium is not a lightweight framework. It is built on top of the discord.js library, and aims to provide most of the core functionality required to bootstrap a powerful, modern Discord bot. Written in TypeScript, it provides the benefits of static type-checking and code completion in modern editors.
With Rhidium, you can focus on what's really important: Creating meaningful features
Excited to begin? Get started or try the demo!
We've compromised a list of some of the core functionality provided by Rhidium:
- Type-safe, re-usable controllers
- Dynamic component handlers
- Synchronized local & API commands, automatic refreshes
- Fully localized (through i18next), convenience localization for commands
- Colorful console logging & verbose, organized file logging
- Wide range of everyday utilities and functionality
- CRON and interval-based jobs
This TypeScript project uses Prisma TypeORM using the postgresql adapter.
Available adapters: cockroachdb, mongodb, postgresql
Note: When using CockroachDB, the
autoincrement()default function is defined only on BigInt fields. Changeautoincrement()tosequence()if you want an sequential Int field.
Collapse/Expand
Please note, a Discord Application is required for both installation methods.
The quickest, and easiest, way to host/use this bot template is by deploying it inside of a Docker container. We recommend Docker Desktop.
- Download the latest release or
git clone git@github.com:rhidium/rhidium.gitthe repo - Run
pnpm setup:linuxorpnpm setup:windows(depending on your OS) in the project root folder - Edit the newly created
.envand/config/config.jsonfiles and provide your configuration - Sync the database:
docker compose run --rm client sh -c "npx prisma db push" - Start the application:
docker compose up -d client(you can view logs withdocker compose logs -f client)
- Install the additional pre-requisites:
- pnpm v9.15.4
- Node.js v16.6.0 or newer
- PostgreSQL v13 or newer
- Download the latest release or
git clone git@github.com:rhidium/rhidium.gitthe repo - Run
pnpm setup:linuxorpnpm setup:windowsin the project root folder - Edit the newly created
.envand/config/config.jsonfiles and provide your configuration - Sync the database:
pnpm db:push - Start the application:
pnpm startfor production, andpnpm devfor local development
The configuration for this project can be found here, and should be very straight-forward.
{
"client": {
"id": "", // Client id from https://discord.dev/application
"token": "", // Client/bot token from https://discord.dev/application
"development_server_id": "" // Only needed for developers/development environments
},
"permissions": {
"owner_id": "1148597817498140774", // The discord user id of the bot owner
"system_administrator_ids": [], // List of discord user ids for system administrators
"developer_ids": [] // List of discord user ids for developers
}
}Additionally, feel free to explore the personalization options.
The .env file holds your secrets and other environmental values. Let's explain the different keys here:
NODE_ENV=production # The node environment your bot is running in. Available values: production, development
# ---------------------------------- Database ---------------------------------- #
POSTGRES_HOST=localhost # Change to "database" if using docker (compose)
POSTGRES_PORT=5432 # The port your PostgreSQL server is running on. Default is 5432.
POSTGRES_USER=postgres # The username for your PostgreSQL server. Default is "postgres".
POSTGRES_PASSWORD=CHANGE_ME # The password for your PostgreSQL server.
POSTGRES_DB=rhidium # The name of the database to connect to. Default is "rhidium".
# The database URL for connecting to the (PostgreSQL) database. You generally don't
# need to change this, but you can if you want to use a different database or schema.
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?schema=public"
We provide multiple resources to help get you started on your project quickly:
- Explore the Template / Example - If you're new here, the best way to determine if Rhidium is a fit for you is by exploring this complete example.
- Check out the API Documentation - Once you're convinced, clone the example/template and check out the API docs to learn more about the inner workings and possibilities.
- Made with TypeScript and discord.js - comes with PM2, Docker, docker compose configurations
Join our support server if you have any questions, feature requests or other feedback:
- Localization for
prompts/interactions - Resolve or otherwise review Typedoc warnings
- Add documentation for
COMPONENT_HANDLER_IDENTIFIER - Apply
data#setDefaultMemberPermissionsto relevant commands - Refactor (now-required)
(as unknown) as (Any)(Typed/API)Command - Implement (+ refactor)
embedsandplaceholdersfrom previous version - Implement (global) reusable command middleware, refactor from previous version
- Command deployment currently doesn't respect
enabled#guilds, meaning they are registered as global commands
- Dashboard for command usage statistics and database metrics
- Refactor
Promptsinto a standalone, opt-in, NPM package
Join our support server if you have any questions, feature requests or other feedback:
Open-source and ISC licensed, meaning you're in full control.