Reports Last.FM now playing to Slack.
lastfm2slack is fairly simply to use and this README should suffice in setup. There are few dependencies you'll need to retrieve before using this app.
Last.FM API key
- Go to this website here and create a new API application
- Fill in the application
- Call it lastfm2slack or something similar - it doesn't really matter
- On the completion screen, it will show the API Key - this is the
- There will also be a "registered to" field. This is the
ℹ️Note: Record these details as you cannot currently view them again
Slack API key
- Go to this page here and create a new API key
- Although Slack does not recommend using Legacy tokens, they are still heavily used and perfectly secure
- Scroll down to the Legacy token generator underneath Legacy information
- Locate the Slack workspace you are looking to get a token for, click the Request Token button next to it
- You may be prompted for a password
- The token will appear in an input field to the left of the button. Place token for
There are many variables you can set. Below is a description of each environment variable.
# Last.FM API Key LASTFM_KEY=last-fm-key # Last.FM username LASTFM_USERNAME=last-fm-username # Slack API Key SLACK_TOKEN=slack-key # @artist, @title, and @album are valid variables STATUS_TEXT=@artist - @title (@album) # Slack emoji; :emoji_name: or remove STATUS_EMOJI=:sound: # Random emoji from your Slack server; true or remove RANDOM_EMOJI=true # Random default music emoji; true or remove RANDOM_MUSIC_EMOJI=true # The emoji used when not playing music NOT_PLAYING_EMOJI=:mute: # Status text shown when not playing music NOT_PLAYING_TEXT=Currently not playing # Censor words from the album, artist, and track; delimiter: ',' BLACKLIST_WORDS=bad,words,mom,doesnt,like # Like the above, but pulls from an external source BLACKLIST_WORDS_URL=https://raw.githubusercontent.com/snguyenthanh/better_profanity/master/better_profanity/profanity_wordlist.txt
docker run -d \ --restart always \ --name lastfm2slack \ -e "LASTFM_KEY=1234asdf" \ -e "LASTFM_USERNAME=coolusername" \ -e "SLACK_TOKEN=xoxp-1234-asdf" \ -e "STATUS_TEXT=@artist - @title (@album)" \ -e "RANDOM_MUSIC_EMOJI=true" \ -e "NOT_PLAYING_EMOJI=:mute:" \ -e "NOT_PLAYING_TEXT=Currently not playing" \ -e "BLACKLIST_WORDS_URL=https://raw.githubusercontent.com/snguyenthanh/better_profanity/master/better_profanity/profanity_wordlist.txt" \ hijef/lastfm2slack