Prerequisites
Before you begin, ensure you have:- .NET 9.0 SDK installed
- PostgreSQL 13+ server running
- A Discord bot token (create one here)
- A Discord server for your tournament
- An osu! account with IRC password for the bot
Steps
Configure environment variables
Create a Edit the
.env file in the project directory using the example template:.env file with your configuration:Finding Discord IDs: Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode), then right-click on channels/roles/servers and select “Copy ID”.
Set up the database
Apply the database schema to your PostgreSQL instance:
- Download the schema file from this gist
- Apply it to your database:
You can use tools like Adminer or pgAdmin for easier database management and data entry.
Install dependencies and run
Restore NuGet packages and start the server:You should see:The Discord bot will now be online in your server.
Link a referee account
In your Discord server, use the
/linkirc command to link the bot’s osu! account:Create your first qualifier room
Schedule a qualifier lobby using the Discord command:This creates a qualifier room scheduled for March 5th at 6:00 PM.
Start the automated match
When it’s time to run the qualifier lobby:
-
Use
/startrefto initialize the match: - A Discord thread will be created with IRC join instructions
-
In the match chat (Discord thread or IRC), invite players:
-
Once all players are ready, start automation:
Monitor and end the match
All match events are logged to the Discord thread in real-time. You can:This saves all match data to the database and archives the Discord thread.
- Monitor match progress in Discord
- Use
!panicif you need to pause automation - Use
>panic_overto resume after resolving issues
What just happened?
You’ve successfully:- ✅ Configured SS-IMS with Discord and PostgreSQL
- ✅ Set up a referee account with IRC access
- ✅ Created and scheduled a qualifier lobby
- ✅ Run a fully automated qualifier match
- ✅ Saved all match data to your database
Next steps
Discord commands
Explore all available Discord slash commands
Qualifiers automation
Deep dive into qualifier automation features
Elimination matches
Learn about head-to-head match automation
Database schema
Understand the tournament data structure
Troubleshooting
Bot doesn’t connect to Discord
- Verify your
DISCORD_BOT_TOKENis correct - Ensure the bot has proper permissions in your server
- Check that you’ve invited the bot with the applications.commands scope
IRC connection fails
- Verify your IRC password at https://osu.ppy.sh/p/irc
- Ensure your osu! account is not logged into IRC elsewhere
- Check that the osu! account has appropriate permissions
Database connection errors
- Verify PostgreSQL is running:
sudo systemctl status postgresql - Check your connection string in
.env - Ensure the database exists:
psql -l
Match won’t start
- Confirm you’ve applied the database schema
- Check that the match exists in the database
- Verify the referee role ID matches your Discord server
For more help, open an issue on GitHub.