Let your Slack co-workers know what you're listening on Spotify!
Before starting, make sure you have both Node.js and npm properly installed.
- Clone this repository or click here to download it.
- Run
yarn
ornpm install
to install the dependencies. - Create a Slack app with the
users.profile:write
user scope and grab an OAuth token for your workspace (at the OAuth & Permissions page). - Create a Spotify app and grab your refresh token with the
user-read-currently-playing
scope. - Optionally, add the :spotify: emoji to your workspace.
- Rename the ".env.example" file to ".env" and fill it in.
- The emojis may be any valid Slack shortcodes, including custom ones.
- You can get the code for the currently available languages here.
- Setting
FILTER_BADWORDS
to true will replace bad words in song titles with asterisks.
Run yarn start
or npm run start
and you're good to go, yet you could use something like pm2 for more control over the application.
List of currently available languages:
Language | Code |
---|---|
English (United States) | en_US |
Portuguese (Brazil) | pt_BR |
If you'd like to submit a translation, you can fork this repository and follow these steps:
- Duplicate the "src/lang/en_US.ts" file and rename it to match your language ISO code. If your code have four letters, use an underscore intead of a hyphen. For example, the "pt-BR" language file would be called "pt_BR.ts".
- In your newly created file, replace the variable name with your language ISO code again.
- In the "src/lang/index.ts" file, import your language and add it to the
lang
array. Make sure these are added in alphabetical order. - Finally, translate the strings in the file you created.