Henwy is a simple bot made in discord.js, I have made this one to be easily hosted through Replit!
- Discord Bot Token Guide
- YouTube Data API v3 Key Guide
2.1 (Optional) Soundcloud Client ID Guide - Node.js v12.0.0 or newer
If you are going to be Hosting through repl.it then follow these steps!
Select Create new Repl
Then select "Import from Github" and paste this repo's link KingRain/SimpleDiscordMusicBot
Then Select Import from Github
Add your token and API in the config.json
File in the correct lines
The click the "Run" Button on top, and you'll get a screen like this
Copy the top link, Now we are going to host it 24/7 by using UptimeRobot Login and set up and account over there, then click add monitor and make your settings like this
After creating a monitor, UptimeRobot would come and wake your website every 5 minitues. Which would make your repl hosted 24/7
If deploying to Heroku make sure to create config variables
git clone https://github.com/KingRain/SimpleDiscordMusicBot.git
cd henwy
npm install
After installation finishes you can use node index.js
to start the bot.
Go to the config.json
file, then add the token and API key
{
"TOKEN": "",
"YOUTUBE_API_KEY": "",
"SOUNDCLOUD_CLIENT_ID": "",
"MAX_PLAYLIST_SIZE": 10,
"PREFIX": "/",
"PRUNING": false,
"STAY_TIME": 30
}
Note: The default prefix is '/'
- 🎶 Play music from YouTube via url
/play https://www.youtube.com/watch?v=GLvohMXgcBo
- 🔎 Play music from YouTube via search query
/play under the bridge red hot chili peppers
- 🎶 Play music from Soundcloud via url
/play https://soundcloud.com/blackhorsebrigade/pearl-jam-alive
- 🔎 Search and select music to play
/search Pearl Jam
Reply with song number or numbers seperated by comma that you wish to play
Examples: 1
or 1,2,3
- 📃 Play youtube playlists via url
/playlist https://www.youtube.com/watch?v=YlUKcNNmywk&list=PL5RNCwK3GIO13SR_o57bGJCEmqFAwq82c
- 🔎 Play youtube playlists via search query
/playlist linkin park meteora
- Now Playing (/np)
- Queue system (/queue, /q)
- Loop / Repeat (/loop)
- Shuffle (/shuffle)
- Volume control (/volume, /v)
- Lyrics (/lyrics, /ly)
- Pause (/pause)
- Resume (/resume, /r)
- Skip (/skip, /s)
- Skip to song # in queue (/skipto, /st)
- Remove song # from queue (/remove, /rm)
- Toggle pruning of bot messages (/pruning)
- Help (/help, /h)
- Command Handler from discordjs.guide
- Media Controls via Reactions
Feel Free to fork this repo and make changes! :D Also you can contribute or fix issues if any Just git-pull after making changes, your help is greatly appreciated
This was inspired heavily by @eritislami! A lot of credit goes towards him, make sure you go and check out his version
If you like my work and would like to Donate then feel free to go here and donate through whichever meathod you want 💙