Skip to content

About

Discord bot that allows you to create trophies and award them to users

Topics

Resources

Security policy

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

Trophy Bot

Pull Requests Issues Contributors Stars
Repo size License

With Trophy Bot, you can award trophies to users. You can create your own trophies per server with a custom name, description, image, and even value, and assign them to users by doing stuff you think deserves to be awarded.

You can then give reward roles for reaching certain scores, or having a leaderboard for the user scores.

Add Trophy Bot to your server

To get started, simply type /help in your server to see a few basic info.

Features

  • Create and customize trophies for your server (name, description, emoji, image, value).
  • Award trophies to users — with autocomplete, bulk awards, and a full audit of who awarded what.
  • Server leaderboard and auto-updating leaderboard panels.
  • Role rewards assigned automatically when users reach score thresholds.
  • Per-server settings (dedication display, role stacking, leaderboard format, and more).
  • Localized replies based on each user's Discord language (English shipped; more via Fluent catalogs).

Tech

Rewritten in Rust (Serenity + Poise + SeaORM) with a normalized database, SQLite for local development, PostgreSQL for production, selected by DATABASE_URL. The previous Node.js implementation was fully migrated: same commands and features, with its known bugs fixed.

See docs/ for specs, architecture decisions, and the migration plan.

Running

cp .env.example .env          # set DISCORD_TOKEN, DISCORD_BOT_ID, DATABASE_URL
cargo run -- up               # apply database migrations
cargo run                     # start the bot

Other CLI subcommands: status / down / fresh / refresh / reset (schema migrations), import --legacy-db <file> (one-shot legacy quick.db data migration), smoke (end-to-end flow against the test guild).

Release with Supervisor

Run release.sh on the deployment machine. It builds a CPU-optimized binary in dist/, copies supervisord.conf, creates images/ and logs/, and creates .env from .env.example only if it is missing. Run the bot from that directory so relative DATABASE_URL and IMAGES_DIR paths resolve there. Add the copied dist/supervisord.conf as a program configuration to Supervisor. It runs the bot as www-data. When that user exists, run release.sh as root: it assigns dist/ recursively to www-data:www-data, removes access for other users, leaves the binary, configuration and .env read-only, and makes images/ and logs/ writable by www-data. On machines without www-data, it skips those ownership and permission changes. Configure the production DATABASE_URL for PostgreSQL before starting the bot.

Docker

./dev.sh build && ./dev.sh up   # or: docker compose up -d
./dev.sh migrate                # apply migrations inside the container
./dev.sh logs

The bot shuts down gracefully on docker stop (SIGTERM).

Development

  • cargo test — full suite (no external services or production data needed).
  • Documentation index: docs/README.md. Development rules live in AGENTS.md.

Bot logs use WARN by default; set DEBUG=true or pass --debug for more detail. Long Discord IDs are replaced with process-local aliases such as [id:…], so related log lines can be followed during one run without recording the raw server or user ID.

Support Server

You can join our support server to get help and report issues.

Contributing

If you like this bot, you can help by contributing to it.

Or, buy a coffee for Antikore, the creator of this bot.

About change of maintainer to jhg

It'll continue development of new features and improvements, and maintenance for fix bugs, without major changes for users. The original developer needs to focus on other projects, and that's why this maintenance change is happening. Nothing to worry about.

License

This project is licensed under the "GNU General Public License v3.0", with additional author attribution terms under Section 7(b).

See "NOTICE" for the applicable author attribution requirements.

About

Discord bot that allows you to create trophies and award them to users

Topics

Resources

Security policy

Stars

5 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages