@@ -9,50 +9,58 @@ your queue. The Spotify link must be at the start of the message in order to be
99✔️ Message that WOULD be picked up:
1010
1111```
12- https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC?si=x-_FFgqBRB20mzW_lM7kDQ pls play this, it's a bop
12+ !prefix https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC?si=x-_FFgqBRB20mzW_lM7kDQ pls play this, it's a bop
1313```
1414
1515❌ Message that WOULD NOT be picked up:
1616
1717```
18- this is a bop can you please play this https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC?si=x-_FFgqBRB20mzW_lM7kDQ
18+ !prefix this is a bop can you please play this https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC?si=x-_FFgqBRB20mzW_lM7kDQ
1919```
2020
2121## Prerequisites
2222
23- - Some basic programming knowledge (running terminal commands and editing JSON
23+ - Some basic programming knowledge (running terminal commands and editing ` .env `
2424 files)
25- - Node (developed and tested on 14.6.0 - your mileage may vary on other versions)
26- - Yarn or NPM
25+ - [ Node] ( https://nodejs.org/en/ ) (developed and tested on 14.6.0 - your mileage may vary on other versions)
2726- A Spotify account
2827
2928## Setup
3029
31- - Go to the [ Spotify developer dashboard] ( https://developer.spotify.com/dashboard/ )
32- and create a new application. The app can have whatever name and description you want
33- - Once the app is created, click on Edit Settings and add a redirect URL of
34- ` http://localhost:8000/spotifyAuth ` (NB: the port will be whatever you have
35- set as the ` AUTH_SERVER_PORT ` in the ` ./.env ` file, by default it is 8000)
36- - Create a ` ./.env ` file based on ` ./.env.template ` file and fill
37- in the fields
38- - The playlist ID can be found by right clicking on the playlist ->
39- clicking Share -> Copy Spotify URI and then copying the ID after ` spotify:playlist: `
40- eg. ` spotify:playlist:{THIS_STRING_IS_THE_ID} ` )
41- - The Spotify client ID and secret are obtained from the application you
42- created in the Spotify developer dashboard
43- - If you wish to have chat feedback, set ` CHAT_FEEDBACK ` to true then generate a
44- [ Twitch Chat OAuth Token] ( https://twitchapps.com/tmi/ ) and set it as the ` TWITCH_TOKEN ` field in
45- the ` config.json ` file. Also set the ` BOT_USERNAME ` field to the name of the account you wish to
46- use (must be the same account you generate the OAuth token for)
47- - Run ` ./build.sh ` This will compile from source using ` npm ` and then build OS-native binaries using ` pkg `
48- - Run the freshly compiled binary for your OS in ` ./dist ` .
49- - Open the authorization link and give the app the required permissions
50- - If you have ` ADD_TO_QUEUE ` toggled on, ensure you have the Spotify client open and that it is active (i.e. is playing a song)
51- - Type a Spotify link in the chat (ensuring the link is the first piece of text in the message)
52- and make sure it shows up in your desired playlist (Spotify links should start
53- with ` https://open.spotify.com/track/ ` )
54- - If there's a problem with Spotify authorization at any point, try deleting the
55- ` spotify-auth-store.json ` file and starting the app again
30+ 1 . Go to the [ Spotify developer dashboard] ( https://developer.spotify.com/dashboard/ )
31+ and create a new application. The app can have whatever name and description you want
32+ 2 . Once the app is created, click on Edit Settings and add a redirect URL of
33+ ` http://localhost:8000/spotifyAuth ` (NB: the port will be whatever you have
34+ set as the ` AUTH_SERVER_PORT ` in the ` ./.env ` file, by default it is 8000)
35+ 3 . Create a ` ./.env ` file based on ` ./.env.template ` file and fill
36+ in the fields
37+
38+ - The playlist ID can be found by right clicking on the playlist ->
39+ clicking Share -> Copy Spotify URI and then copying the ID after ` spotify:playlist: `
40+ eg. ` spotify:playlist:{THIS_STRING_IS_THE_ID} ` )
41+ - The Spotify client ID and secret are obtained from the application you
42+ created in the Spotify developer dashboard
43+ - If you wish to have chat feedback, set ` CHAT_FEEDBACK ` to true then generate a
44+ [ Twitch Chat OAuth Token] ( https://twitchapps.com/tmi/ ) and set it as the ` TWITCH_TOKEN ` field in
45+ the ` .env ` file. Also set the ` BOT_USERNAME ` field to the name of the account you wish to
46+ use (must be the same account you generate the OAuth token for)
47+
48+ 4 . Run ` bash ./build.sh ` . This will automatically compile from source using ` npm ` and then build OS-native binaries using ` pkg `
49+ 5 . Run the freshly compiled binary for your OS in ` ./dist ` .
50+ 6 . Open the authorization link and give the app the required permissions
51+ 7 . If you have ` ADD_TO_QUEUE ` toggled on, ensure you have the Spotify client open and that it is active (i.e. is playing a song)
52+ 8 . Type a Spotify link in the chat (ensuring the link is the first piece of text in the message)
53+ and make sure it shows up in your desired playlist (Spotify links should start
54+ with ` https://open.spotify.com/track/ ` )
55+ 9 . If there's a problem with Spotify authorization at any point, try deleting the
56+ ` spotify-auth-store.json ` file and starting the app again
57+
58+ ### Note
59+
60+ If you would prefer to launch the bot without generating a binary file you can replace steps 4 and 5 the following
61+
62+ - Run ` npm install ` or ` yarn `
63+ - Run ` npm start ` or ` yarn start `
5664
5765## Open Source Libraries Used
5866
@@ -97,3 +105,25 @@ MIT License
97105Used for strong typings
98106
99107Apache 2.0 License
108+
109+ ### [ dotenv] ( https://github.com/motdotla/dotenv )
110+
111+ Used to load environment variables
112+
113+ BSD 2-Clause "Simplified" License
114+
115+ ### [ env-smart] ( https://github.com/jessety/env-smart )
116+
117+ Used to set types for environment variables
118+
119+ MIT License
120+
121+ ### [ pkg] ( https://github.com/vercel/pkg )
122+
123+ Used to create platform binaries
124+
125+ MIT License
126+
127+ ## Contributors
128+
129+ Checkout the [ Contributors file] ( ./CONTRIBUTORS.md ) to see everyone who has helped out with the bot
0 commit comments