Looking for discord2lastfm? Discord does not accept bots that include "discord" in the name, so the bot is now "Cordscrobbler".
This bot scrobbles songs played by other bots on your Discord server to Last.fm. It will automatically scrobble if the user is on the same audio channel as the bot, on any server that this bot is added to.
To enable it for you, you'll need to send a message to the bot with -cords register
and log in with your Last.fm account.
- Chip Bot
- Hydra Bot
- Jockie Music
- Tempo Bot
- Groovy Bot (out of service)
- Rythm Bot (out of service) (requires additional configuration)
Just click here to add to your server :)
This project uses discord.js and needs Node.js LTS to be installed on your machine.
First, install the project dependencies running:
npm install
Then, on the project root folder, create a new .env
file and copy the contents of the .env.template
.
Replace the following fields:
<your-discord-bot-token>
: The Discord token for your bot, which can be obtained from the Discord developer portal.<your-spotify-app-client-id>
and<your-spotify-app-client-secret>
: Tokens from your Spotify integration, which can be obtained on the Spotify developer dashboard. This bot uses the Spotify API to look for track information.<your-lastfm-api-key>
and<your-lastfm-shared-secret>
: The tokens from Last.fm API, which can be obtained on the Last.fm create API account form.<service-account-key-file-base64>
: A service account key file encoded in base64 from a Firebase project. This bot uses Firebase Firestore to store user data.<your-firebase-database-url>
: The Firebase Database URL from a Firebase project.<your-topgg-token>
: The token from top.gg API, to post bot usage statistics. It is optional, and statistics are only sent whenNODE_ENV
is set toproduction
.
Remember to keep these tokens in a safe place.
You can also change the bot prefix by replacing -cords
.
Finally, to start the bot, run:
npm run build
npm start
Alternatively, you can run npm run watch
while testing to automatically reload on file changes.
If you find any problems during the bot usage, please open an issue here on GitHub. PRs are welcome too!
Feel free to join the Cordscrobbler Discord server. Feedbacks are appreciated!