A Discord bot that integrates with the RomM API to provide information about your ROM collection, handle user ROM requests, and control RomM from Discord.
Disclaimer: This was primarily created using Claude Code after my project scope outpaced my programming ability.
docker pull idiosync000/romm-comm:latest/app/data to a host directory — this stores the user/request DB and emoji sync status.pip install py-cord aiohttp python-dotenv qrcode Pillow python-socketio requests aiosqlite python-dateutil
If you want downloads to work without requiring users to log in (including Switch shop / QR code console installs), set the following on your RomM server environment:
DISABLE_DOWNLOAD_ENDPOINT_AUTH=true
Setting this disables authentication for the download endpoint. If not set (or set to false), users must be logged in to RomM to download files.
Create a .env file in the project root with the following variables.
# Required: Discord + RomM connection
TOKEN=your_discord_bot_token
GUILD=your_guild_id
API_URL=http://your_romm_host:port
# Required: RomM API auth — use EITHER a client token (preferred)...
ROMM_CLIENT_TOKEN=rmm_your_client_token
# ...OR a username/password:
#ROMM_USER=api_username
#ROMM_PASS=api_password
# Optional
ADMIN_ID=admin_user_id
DOMAIN=your_website_domain
REQUESTS_ENABLED=true
IGDB_CLIENT_ID=your_client_id
IGDB_CLIENT_SECRET=your_client_secret
AUTO_REGISTER_ROLE_ID=romm_users_role_id
UPDATE_VOICE_NAMES=true
CHANNEL_ID=your_channel_id
RECENT_ROMS_ENABLED=true
RECENT_ROMS_CHANNEL_ID=your_channel_id
RECENT_ROMS_MAX_PER_POST=10
RECENT_ROMS_BULK_THRESHOLD=25
GGREQUESTZ_ENABLED=false
GGREQUESTZ_URL=http://ip:port
GGREQUESTZ_API_KEY=ggr_api_key
Required:
TOKEN — Discord bot token.GUILD — Discord server (guild) ID.API_URL — Base URL for your RomM instance (use http://ip:port or a domain).ROMM_CLIENT_TOKEN — (preferred, RomM 4.8+) A Client API Token so the bot connects without storing a user's password. Create one in the RomM web UI under your user profile → API Tokens (or POST /api/client-tokens), granting the scopes roms.read platforms.read firmware.read users.read users.write me.write. It must be created by an admin user, since scopes are capped by the creating user's permissions (user-manager commands need users.write). When set, ROMM_USER/ROMM_PASS are not required.ROMM_USER / ROMM_PASS — Username/password fallback used when no client token is set. Legacy USER / PASS still work, but USER can collide with the operating system username.Common optional settings (defaults shown where applicable):
ADMIN_ID — User OR role ID allowed to run admin commands (scan, sync users, etc.).DOMAIN — Public domain for download links (default: No website configured).SYNC_RATE — How often to sync with the API in seconds (default: 3600).UPDATE_VOICE_NAMES — Enable voice channel stats (default: true).REQUESTS_ENABLED — Enable request commands (default: true).IGDB_CLIENT_ID, IGDB_CLIENT_SECRET — For request metadata (can be shared with RomM).AUTO_REGISTER_ROLE_ID — Role that triggers automatic RomM invite link DMs to users.CHANNEL_ID — Channel for sync results and user manager logs.RECENT_ROMS_* — Controls for recent-ROM posting (enabled, channel id, thresholds).GGREQUESTZ_ENABLED — Enable GGrrequestz for request managmenet (default: false).GGREQUESTZ_URL — Base URL for your GGRequestz instance (use http://ip:port or a domain).GGREQUESTZ_API_KEY — Your GGRequestz API key (properly scoped)./search [platform] [game] — Search ROMs with interactive results and optional QR code for console installs./request, /my_requests, /request_admin — Submit, view, and manage requests./random [platform] — Fetch a random ROM (platform optional)./firmware [platform] — List firmware files with hash details and download links./scan [option] — Run or check scans (admin only): full, platform, stop, status, unidentified, hashes, new_platforms, partial, summary./platforms — Display all available platforms with their ROM counts./igdb [option] — View list of games from IGDB: upcoming, recent, popular, or exclusive, generally or by platform with option to request./user_manager — Manage Romm and Discord users (linking, new account prompting, etc.) (admin only)./refresh_recent_metadata — Refresh recently added game notifiction metadata/covers (admin only)./ra-leaderboard [game] — RetroAchievements leaderboard. With no argument it ranks users across the server by total achievements earned (hardcore and games-mastered shown as columns); pass a game name for a per-game board. Discord-linked users show their server name with a 🔗 marker. Requires the bot's RomM token to have the users.read scope (already in the default ROMM_CLIENT_TOKEN scope list and the OAuth grant).
RECENT_ROMS_ENABLED=true) the bot posts newly added games to the configured channel./refresh_recent_metadata [count: n] where n is the number of messages you want to go back and refresh, from the most recent. Default is 1, which is the most recently posted notification.
When enabled (UPDATE_VOICE_NAMES=true) the bot creates voice channels to display:
Voice channel names are only updated when the underlying stat changes. The bot will create new channels and delete old ones to avoid duplicates.
The bot updates its "Now Playing" / status with the total ROM count whenever it refreshes API data.
User features:
Admin features:
GGRequestz Integration
Add the below variables to your .env to enable:
GGREQUESTZ_ENABLED=true
GGREQUESTZ_URL=http://ip:port
GGREQUESTZ_API_KEY=ggr_api_key
/manage_users — Manage Romm and Discord users (admin only).Onboarding via role:
API_URL)..env configuration.Contributions are welcome. Open issues or PRs with clear descriptions, logs, and reproduction steps.
Python
99.9%
A Discord bot that integrates with the RomM API to provide information about your ROM collection, handle user ROM requests, and control RomM from Discord.
Disclaimer: This was primarily created using Claude Code after my project scope outpaced my programming ability.
docker pull idiosync000/romm-comm:latest/app/data to a host directory — this stores the user/request DB and emoji sync status.pip install py-cord aiohttp python-dotenv qrcode Pillow python-socketio requests aiosqlite python-dateutil
If you want downloads to work without requiring users to log in (including Switch shop / QR code console installs), set the following on your RomM server environment:
DISABLE_DOWNLOAD_ENDPOINT_AUTH=true
Setting this disables authentication for the download endpoint. If not set (or set to false), users must be logged in to RomM to download files.
Create a .env file in the project root with the following variables.
# Required: Discord + RomM connection
TOKEN=your_discord_bot_token
GUILD=your_guild_id
API_URL=http://your_romm_host:port
# Required: RomM API auth — use EITHER a client token (preferred)...
ROMM_CLIENT_TOKEN=rmm_your_client_token
# ...OR a username/password:
#ROMM_USER=api_username
#ROMM_PASS=api_password
# Optional
ADMIN_ID=admin_user_id
DOMAIN=your_website_domain
REQUESTS_ENABLED=true
IGDB_CLIENT_ID=your_client_id
IGDB_CLIENT_SECRET=your_client_secret
AUTO_REGISTER_ROLE_ID=romm_users_role_id
UPDATE_VOICE_NAMES=true
CHANNEL_ID=your_channel_id
RECENT_ROMS_ENABLED=true
RECENT_ROMS_CHANNEL_ID=your_channel_id
RECENT_ROMS_MAX_PER_POST=10
RECENT_ROMS_BULK_THRESHOLD=25
GGREQUESTZ_ENABLED=false
GGREQUESTZ_URL=http://ip:port
GGREQUESTZ_API_KEY=ggr_api_key
Required:
TOKEN — Discord bot token.GUILD — Discord server (guild) ID.API_URL — Base URL for your RomM instance (use http://ip:port or a domain).ROMM_CLIENT_TOKEN — (preferred, RomM 4.8+) A Client API Token so the bot connects without storing a user's password. Create one in the RomM web UI under your user profile → API Tokens (or POST /api/client-tokens), granting the scopes roms.read platforms.read firmware.read users.read users.write me.write. It must be created by an admin user, since scopes are capped by the creating user's permissions (user-manager commands need users.write). When set, ROMM_USER/ROMM_PASS are not required.ROMM_USER / ROMM_PASS — Username/password fallback used when no client token is set. Legacy USER / PASS still work, but USER can collide with the operating system username.Common optional settings (defaults shown where applicable):
ADMIN_ID — User OR role ID allowed to run admin commands (scan, sync users, etc.).DOMAIN — Public domain for download links (default: No website configured).SYNC_RATE — How often to sync with the API in seconds (default: 3600).UPDATE_VOICE_NAMES — Enable voice channel stats (default: true).REQUESTS_ENABLED — Enable request commands (default: true).IGDB_CLIENT_ID, IGDB_CLIENT_SECRET — For request metadata (can be shared with RomM).AUTO_REGISTER_ROLE_ID — Role that triggers automatic RomM invite link DMs to users.CHANNEL_ID — Channel for sync results and user manager logs.RECENT_ROMS_* — Controls for recent-ROM posting (enabled, channel id, thresholds).GGREQUESTZ_ENABLED — Enable GGrrequestz for request managmenet (default: false).GGREQUESTZ_URL — Base URL for your GGRequestz instance (use http://ip:port or a domain).GGREQUESTZ_API_KEY — Your GGRequestz API key (properly scoped)./search [platform] [game] — Search ROMs with interactive results and optional QR code for console installs./request, /my_requests, /request_admin — Submit, view, and manage requests./random [platform] — Fetch a random ROM (platform optional)./firmware [platform] — List firmware files with hash details and download links./scan [option] — Run or check scans (admin only): full, platform, stop, status, unidentified, hashes, new_platforms, partial, summary./platforms — Display all available platforms with their ROM counts./igdb [option] — View list of games from IGDB: upcoming, recent, popular, or exclusive, generally or by platform with option to request./user_manager — Manage Romm and Discord users (linking, new account prompting, etc.) (admin only)./refresh_recent_metadata — Refresh recently added game notifiction metadata/covers (admin only)./ra-leaderboard [game] — RetroAchievements leaderboard. With no argument it ranks users across the server by total achievements earned (hardcore and games-mastered shown as columns); pass a game name for a per-game board. Discord-linked users show their server name with a 🔗 marker. Requires the bot's RomM token to have the users.read scope (already in the default ROMM_CLIENT_TOKEN scope list and the OAuth grant).
RECENT_ROMS_ENABLED=true) the bot posts newly added games to the configured channel./refresh_recent_metadata [count: n] where n is the number of messages you want to go back and refresh, from the most recent. Default is 1, which is the most recently posted notification.
When enabled (UPDATE_VOICE_NAMES=true) the bot creates voice channels to display:
Voice channel names are only updated when the underlying stat changes. The bot will create new channels and delete old ones to avoid duplicates.
The bot updates its "Now Playing" / status with the total ROM count whenever it refreshes API data.
User features:
Admin features:
GGRequestz Integration
Add the below variables to your .env to enable:
GGREQUESTZ_ENABLED=true
GGREQUESTZ_URL=http://ip:port
GGREQUESTZ_API_KEY=ggr_api_key
/manage_users — Manage Romm and Discord users (admin only).Onboarding via role:
API_URL)..env configuration.Contributions are welcome. Open issues or PRs with clear descriptions, logs, and reproduction steps.
Python
99.9%