This open source project is a node package made to have a personal discord bot to play music from youtube and spotify.
To install everything you need, you'll have to run the command
npm install
To run the bot you will need to add your discord bot token and add it to the config.js
file as shown here:
export default {
token: "YOUR_TOKEN_HERE",
prefix: "!!",
...
Then, to start the resource using node, you will need to run the command
node index.js
I suggest you tu use nodemon to run the bot if you need to edit the file and restart the resource automatically with
npm run dev
If you want to search songs from spotify, just go to the Spotify Developer Dashboard, create your own application and use the credential on the application page and change them in the config.js
as shown down here:
...
spotify: {
clientId: "YOUR_SPOTIFY_CLIENT_ID_HERE",
secret: "YOUR_SPOTIFY_SECRET_HERE"
},
...
If you want to search the lyric of the current playing song using the "lyric" command, you must register a developer account on MusixMatch, then insert the api key in the config.js
file. Keep in mind that the free api do not provide access to the complete lyric of a song.
...
lyrics: {
token: "YOUR_MUSIXMATCH_TOKEN_HERE"
},
...