Skip to content

rhidium/rhidium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

logo

Font_PNG

semantic-release: angular GitHub Release GitHub License

Discord server

πŸ‘‹ Introduction

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.

🀝 About

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!

🀩 Features (non-exhaustive)

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

πŸ’½ Database

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. Change autoincrement() to sequence() if you want an sequential Int field.

πŸ› οΈ Installation

Collapse/Expand

Please note, a Discord Application is required for both installation methods.

πŸ“¦ Run as a Docker container (preferred)

The quickest, and easiest, way to host/use this bot template is by deploying it inside of a Docker container. We recommend Docker Desktop.

  1. Download the latest release or git clone git@github.com:rhidium/rhidium.git the repo
  2. Run pnpm setup:linux or pnpm setup:windows (depending on your OS) in the project root folder
  3. Edit the newly created .env and /config/config.json files and provide your configuration
  4. Sync the database: docker compose run --rm client sh -c "npx prisma db push"
  5. Start the application: docker compose up -d client (you can view logs with docker compose logs -f client)

πŸ–₯️ Run as a plain NodeJS app

  1. Install the additional pre-requisites:
  2. Download the latest release or git clone git@github.com:rhidium/rhidium.git the repo
  3. Run pnpm setup:linux or pnpm setup:windows in the project root folder
  4. Edit the newly created .env and /config/config.json files and provide your configuration
  5. Sync the database: pnpm db:push
  6. Start the application: pnpm start for production, and pnpm dev for local development

βš™οΈ Configuration

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.

dotenv

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"

πŸ“š Documentation

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

πŸ™‹ Support

Join our support server if you have any questions, feature requests or other feedback:

banner

πŸ—ΊοΈ Roadmap / To-Do

High Priority

  • Localization for prompts/interactions
  • Resolve or otherwise review Typedoc warnings
  • Add documentation for COMPONENT_HANDLER_IDENTIFIER
  • Apply data#setDefaultMemberPermissions to relevant commands
  • Refactor (now-required) (as unknown) as (Any)(Typed/API)Command
  • Implement (+ refactor) embeds and placeholders from 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

Low Priority

  • Dashboard for command usage statistics and database metrics
  • Refactor Prompts into a standalone, opt-in, NPM package

πŸ™‹ Support

Join our support server if you have any questions, feature requests or other feedback:

banner

Open-source and ISC licensed, meaning you're in full control.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy