Discord rich presence for Last.fm.
iTunes, Windows Media Player, VLC all work with this.
Discord.fm is relatively easy to set up. Follow the steps below.
- If you haven't already, create a Last.fm account.
- Configure your music streaming service to send data to Last.fm, more information is available here.
- Aquire a key and secret from Last.fm. You only need to fill in the name and description. I recommend saving these keys in a file somewhere - you will not be able to get them back if you lose them.
- Create a Discord application and enable rich presence.
- You can also use the premade Discord.fm account - set the client ID as
705049638411042876
.
- You can also use the premade Discord.fm account - set the client ID as
- (optional) Add two images to the resources section on the rich presence page. These can be configured later in the configuration file.
- Clone the git repository.
- Create a file in the root of the repository called
config.js
. Add the contents shown below this setup section. - Open a terminal window in the root of the repository on your computer.
- Run
npm i
. - Run
node .
. - Sit back and let the music play.
You can use PM2 to keep the program running in the background.
module.exports = {
lastfm: {
key: 'LASTFM_KEY',
secret: 'LASTFM_SECRET',
username: 'LASTFM_USERNAME'
},
discord: {
// Edit this if you want to use your own client.
clientId: '705049638411042876'
},
icons: {
// Edit these if you want to use your own client (logo is largeImage, user is smallImage).
logo: 'logo',
user: 'htbrown'
}
}