Setting up JMusicBot on ServerPrism
Get your JMusicBot up and running on ServerPrism with this step-by-step setup guide.
JMusicBot is a powerful and user-friendly Discord music bot. This guide covers creating your bot in Discord, inviting it to your server, configuring it on ServerPrism, and getting it online.
Create your bot in Discord Developer Portal
- Go to the Discord Developer Portal.
- Click New Application.
- Give your application a name (e.g., "My Music Bot") and click Create.
- Navigate to the Bot tab on the left sidebar.
- Click Add Bot, then Yes, do it!.
- Under TOKEN, click Reset Token, then Yes, do it!.
- Copy this token immediately. You will need it for your ServerPrism configuration. Keep it secret!
- Scroll down to Privileged Gateway Intents.
- Enable the Message Content Intent toggle. JMusicBot needs this to read commands like
!play song name.
Invite the bot to your server
- Go to the OAuth2 tab, then select URL Generator on the left sidebar.
- Under SCOPES, select
bot. - Under BOT PERMISSIONS, select the following:
Read Messages/View ChannelsSend MessagesConnectSpeakUse Voice ActivityManage Messages(recommended for queue management)Read Message History
- Copy the generated URL at the bottom of the page.
- Paste the URL into your browser and select the Discord server you want to invite the bot to. Click Authorize.
Order on ServerPrism
When you ordered your Discord bot server, you likely selected JMusicBot as your runtime. A 1 GB RAM plan is generally sufficient for JMusicBot. You picked your preferred region during the order process, and your server is now deployed and awaiting configuration.
Configure startup variables
Your JMusicBot instance on ServerPrism uses environment variables for configuration. You set these in the Startup tab of your server panel.
-
Navigate to your server's panel on ServerPrism.
-
Click on the Startup tab.
-
Locate the following variables and set their values:
BOT_TOKEN: Paste the bot token you copied from the Discord Developer Portal.PREFIX: Set your desired command prefix (e.g.,!,?,j!). This is how users will interact with your bot (e.g.,!play).OWNER_ID: Your Discord user ID. This grants you special administrative commands. To find your user ID, enable Developer Mode in Discord (User Settings > Advanced), then right-click your username and select "Copy ID".SPOTIFY_CLIENT_ID(Optional): If you want Spotify integration, create a Spotify Developer application here and get your Client ID.SPOTIFY_CLIENT_SECRET(Optional): The Client Secret for your Spotify Developer application.YOUTUBE_API_KEY(Optional but Recommended): While JMusicBot can often function without one, a YouTube API key helps with search reliability and avoids rate limits. Get one from the Google Cloud Console.
Note: JMusicBot typically does not require a
MONGODB_URIor similar database connection string for its basic operation, as it uses a simple file-based configuration. -
Save any changes.
First start
- Go to the Console tab in your ServerPrism panel.
- Click the Start button.
- Watch the console output. A successful startup will show messages indicating the bot is connecting to Discord, loading commands, and eventually a line similar to
[INFO] JMusicBot is ready!or[INFO] Logged in as <YourBotName>#<Discriminator>. Your bot's status in Discord will change to online.
Common issues
- Bot not coming online / Token Rejected: Double-check your
BOT_TOKENin the Startup tab. Ensure there are no extra spaces or incorrect characters. Regenerate the token in the Discord Developer Portal if necessary. - Bot online but not responding to commands: Verify you enabled the Message Content Intent in the Discord Developer Portal under the Bot tab. Also, ensure your
PREFIXis correctly set and you're using it (e.g.,!playif your prefix is!). Check the console for any error messages when you try to use a command. - Bot in voice channel but no audio: Ensure the bot has the
ConnectandSpeakpermissions in the channel or category it's trying to join. Also, check the console for any errors related to audio playback.
Next steps
Now that your JMusicBot is running, you can explore its commands by typing your PREFIX followed by help (e.g., !help). You can manage queues, skip songs, adjust volume, and more. For advanced configuration or troubleshooting, refer to the official JMusicBot GitHub repository.
Disclaimer: Streaming audio from YouTube using bots may violate YouTube's Terms of Service. Discord may revoke bot tokens found to be in violation.