https://github.com/underctrl-io/leveling-bot
Leveling bot example built with commandkit v1
https://github.com/underctrl-io/leveling-bot
canvacord commandkit discordjs leveling-bot prisma redis
Last synced: about 1 month ago
JSON representation
Leveling bot example built with commandkit v1
- Host: GitHub
- URL: https://github.com/underctrl-io/leveling-bot
- Owner: underctrl-io
- Created: 2025-05-13T15:55:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-04T02:43:41.000Z (11 months ago)
- Last Synced: 2025-10-11T03:59:11.370Z (8 months ago)
- Topics: canvacord, commandkit, discordjs, leveling-bot, prisma, redis
- Language: TypeScript
- Homepage: https://commandkit.dev
- Size: 685 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Leveling Bot
> [!IMPORTANT]
> This repository has been archived in favor of [examples/with-leveling-system](https://github.com/underctrl-io/commandkit/tree/main/examples/with-leveling-system)
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](https://discord.js.org), using [CommandKit](https://commandkit.dev) framework.
## Features
- User leveling system based on messages
- Rank card & Leaderboard card powered by [canvacord](https://canvacord.neplex.dev)
- 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](https://umami.is)
## 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:
```bash
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:
```env
# 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
```bash
bun dev
```
### Building the Bot
```bash
bun run build
```
### Running in Production
```bash
bun start
```