-
Create a Discord application and bot at the Discord Developer Portal, and copy the bot token.
-
Provide the token without committing it (user-secrets):
dotnet user-secrets set "Discord:Token" "<your-bot-token>" --project src/RustPlusBot.Host
This works because
src/RustPlusBot.Host/RustPlusBot.Host.csprojalready contains aUserSecretsId. -
Invite the bot to a test guild with the
applications.commandsandbotscopes. -
Run the bot:
dotnet run --project src/RustPlusBot.Host
On first run the host applies the EF Core migration and creates
rustplusbot.dbin the working directory. -
In the guild, use the slash commands per the provisioning flow below.
A missing or empty Discord:Token makes the host fail fast at startup with a clear OptionsValidationException.
- Invite the bot with the Manage Channels, Manage Roles, Manage Messages, and Embed Links permissions.
- In your test guild, run
/setup. The bot creates a RustPlusBot category with#information,#setup, and#settingschannels and posts its anchored messages. - Re-running
/setupis safe — it reconciles and repairs without creating duplicates. - Change the language from the selector in
#settings. - In Development (
Workspace:EnableDangerCommands = true), use/workspace simulate-server name:<n> ip:<host> port:<port>to create a server category, and/workspace resetto delete the whole workspace.