How to setup a Discord music bot with Red


Summary 
Discord Bots have many possible functions, and one of the most popular features is using the bots as a music player. While there are bots designed explicitly for that purpose, such as JMusicBot, many bots like Red also have this feature. This guide will review how to create a Discord bot and set it up as a music player with Red. Note that this function requires a large amount of memory and will likely run into issues on package two servers or lower.

Note Red requires a large amount of RAM; having at least 1GB (Package 3) is recommended to run Red.


How to Setup a Discord Music Bot with Red

1. Log in to the BisectHosting Games panel.

2. Open the Currently Hosting dropdown and select Red.


3. Wait for the server to install, then go to the Startup tab.


4. First, generate a bot token by going to the Discord Dev Portal. This may prompt a login.


5. Press New Application from the top right.


6. Pick a name for the app; this can be anything and will not affect its name on servers.


7. Set any desired descriptors, images, or details for the app.


8. Once finished editing, click Save Changes from the bottom right.


9. Navigate to the Bots tab and enter a username for the bot. This is what the name will appear as on servers.



10. Untoggle the Public Bot setting and toggle on the Message Content Intent and Server Members Intents settings.


11. Once finished editing, choose Save Changes.


12. From the Token section, choose Copy. If no token is present, then select the Reset Token button.


13. Return to the Startup tab on the Games panel and paste the Discord Bot Token.


14. Customize the prefix the bot will respond to. By default, it will react to .<command> .


Note Do not use / as the prefix for Red commands, this will cause them to stop functioning.


15. Go to the Console tab and choose Start.


16. After the bot has been started, it will paste a link into the Console.


17. Click the link and select the desired server. Adding a bot requires having Manage Server permissions on that server.


18. The bot will now join the server.


19. Run the command [p]load audio to download the required files for playing audio.


Note "[p]" is short for "Prefix" and is replaced by the prefix we assigned earlier, such as . or ! .


20. Wait for the server console to display Lavalink WS connected.


21. Next, run [p]audioset dc to have the bot disconnect when nothing is queued.


22. Use [p]play <songname> to play any song. It works with direct links; however, they are not required.


23. Further commands can be found on the Red Website or by entering the .help command.

Command Description
[p]play <songname, URL> Play a single song or playlist URL. Use this command with words to search for a song.
[p]search <text> Searches for a track on YouTube.
[p]search sc <keywords> Searches for a track on SoundCloud using keywords.
[p]stop Stops the current track and clears the queue.
[p]pause Toggles the music paused or unpause, use [p]pause again to resume.
[p]prev Returns to the beginning of the last song played.
[p]skip Skips to the next song in the queue.
[p]seek <timestamp, seconds> Seeks to a specific timestamp or seeks ahead by seconds.
[p]now Shows the currently playing song.
[p]volume <0%-150%> Sets the volume of the audio playing.
[Owner Only] [p]audioset maxvolume <0%-150%> Allows the server owner to set a limit to the volume command.



Was this answer helpful?

1
« Back