Getting started

Discord application setup#

Create one Discord application for each VTune instance. Keep it private and allow only the servers you intend to operate.

Create the application#

In the Discord Developer Portal, create an application and add a bot. Record the application/client ID, generate an OAuth client secret, and create the bot token. Store credentials only in your deployment secret store or .env; never commit them.

OAuth redirect#

Add this exact redirect URI, replacing the hostname with your public VTune domain:

https://music.example.com/auth/discord/callback

The scheme and host must match PUBLIC_BASE_URL. VTune uses the identify OAuth scope for dashboard sign-in.

Gateway and permissions#

Enable only the Guilds and GuildVoiceStates gateway intents. Generate the current invite URL from the release checkout:

npm run invite

The bot needs permission to view and connect to the selected voice channel, speak, send messages, and use application commands. Do not grant Administrator.

Restrict servers#

Set ALLOWED_GUILD_IDS to an explicit comma-separated allowlist. VTune rejects and leaves every other guild. Use DISCORD_DEV_GUILD_ID only when registering development commands to a test server.