Official Discord bot for RetroRealm. Exposes Playmatch as Discord slash commands so users can identify ROMs, browse matched companies and platforms, and submit metadata suggestions without leaving Discord.
Every response is rendered with Discord's Components V2 (top-level Container, TextDisplay, Separator, ActionRow). No classic embeds.
-
/list companiesand/list platformswith paginated tables -
/get game <hashes|name+size>for a full Playmatch metadata card (matched platform, company, ROM files, DAT file, provider mappings) -
/suggest game|company|platformwith owner approval buttons and an outcome DM back to the submitter -
/match game|company|platformfor manual metadata matching, restricted to bot owners and trusted roles -
/toggle_updaterole toggle for the RetroRealm guild -
/pingand a custom/help - Components V2 flag (
IS_COMPONENTS_V2) on every outgoing message
- Pin serenity and poise back to released crates.io versions once a Components V2 release ships
- Expose further Playmatch endpoints as commands as they stabilise
- Rust 1.95+ from here
- A Discord bot token. Create an application at the Discord Developer Portal, enable a Bot user, and use the
applications.commandsscope when inviting it - Access to a Playmatch instance. The public one at playmatch.retrorealm.dev works, or self-host from RetroRealm/playmatch
- Clone the repository
- Create a
.envin the repository root with the variables below - Run
cargo run(debug) orcargo run --release
| Variable | Required | Purpose |
|---|---|---|
DISCORD_TOKEN |
yes | Bot token from the Discord Developer Portal |
PLAYMATCH_API_AUTH |
yes | Bearer token for the Playmatch API |
PLAYMATCH_API_URL |
no | Playmatch base URL, defaults to https://playmatch.retrorealm.dev |
DISCORD_STATUS |
no | Activity kind (playing, listening, watching, competing) |
DISCORD_STATUS_NAME |
no | Activity text shown next to the kind |
DISCORD_RETROREALM_SERVER_ID |
for guild commands | Guild id used when registering guild-scoped commands |
DISCORD_RETROREALM_STAFF_ROLE_ID |
no | Role id that bypasses trusted-role checks |
DISCORD_TRUSTED_ROLE_IDS |
no | Comma-separated role ids allowed to run /match |
DISCORD_RETROREALM_UPDATE_ROLE_ID |
no | Role id toggled by /toggle_update |
DISCORD_RETROREALM_SUGGESTION_CHANNEL_ID |
no | Channel id where suggestion review cards are posted |
Docker images are available here at ghcr.io/retrorealm/retrobot.
- Rust - the programming language used
- tokio - async runtime
- serenity - Discord API client (
nextbranch, for Components V2) - poise - command framework on top of serenity (
serenity-nextbranch) - reqwest - HTTP client
- progenitor - generator for the in-tree
playmatch_clientcrate
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- DevYukine - Initial work - DevYukine
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details