Skip to content

underctrl-io/leveling-bot

Repository files navigation

Leveling Bot

Leveling Bot is a Discord bot for managing user levels and experience points (XP) in a Discord server. This bot is built with discord.js, using CommandKit framework.

Features

  • User leveling system based on messages
  • Rank card & Leaderboard card powered by canvacord
  • Redis powered caching with on-demand cache invalidation
  • Rate limiting to prevent spam
  • Hybrid commands (use interactions or message commands)
  • Customizable prefix for message commands
  • Multi-language support
  • Components v2
  • Analytics with Umami

Tech Stack

  • Node.js
  • Discord.js
  • CommandKit
  • Redis
  • Prisma
  • TypeScript

Getting Started

Ensure you have Node.js and npm installed. Clone the repository and install the dependencies:

git clone https://github.com/underctrl-io/leveling-bot
cd leveling-bot
bun install

Environment Variables

Create a .env file in the root directory and add the following variables:

# The discord bot token
DISCORD_TOKEN="xxx"

# Redis url
REDIS_URL="redis://localhost:6379"

# Database url
DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public"

Running the Bot

bun dev

Building the Bot

bun run build

Running in Production

bun start

About

Leveling bot example built with commandkit v1

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published