A Twitch bot that lets people from Twitch chat request songs from your Foobar2000 playlist.
For the YouTube version of this bot go here.
-
!songrequest [search query] - request songs from the Foobar2000 playlist
-
!currentsong - bot will post the artist and title of the currently playing song in chat (works via whispers as well)
-
!previoussong - bot will post the artist and title of the previous song in chat (works via whispers as well)
-
!queuelength - bot will post the length of the playback queue in chat (works via whispers as well)
-
!ping - bot responds with pong! to verify it is working
-
Cooldowns for individual songs and for individual users
-
Automatically save requests that aren't in your playlist to a text file
-
Install Foobar2000
-
Open Foobar2000
-
Create a playlist with your music
-
Close Foobar2000
-
Install foo_httpcontrol
-
Open Foobar2000
-
Allow Foobar2000 access to the internet
-
Go to http://127.0.0.1:8888/ in your browser to make sure it’s installed, you should see some installed templates, we'll now install some more
-
Copy the foo_httpcontrol_data from this repository
-
Open up appdata (press the windows key and R, type in %appdata% and press ok)
-
Navigate to *C:\Users\UserNameHere\AppData\Roaming\foobar2000*
-
Paste the foo_httpcontrol_data folder here
-
Go to http://127.0.0.1:8888/playlistviewer/ in your browser, see the name of the currently playing song there
-
Install node.js
-
To test if node.js is installed correctly:
- Open cmd
- Type node and hit enter
- You're now in javascript land!
-
Go to https://www.twitch.tv/ and log out if you’re logged in
-
Sign up for a new account
-
Log in to twitch with your bot account
-
Click on connect with twitch
-
Make sure you’re using your bot account
-
Copy the oauth code which looks like oauth:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx with a bunch of random characters instead of x’s, you’ll need this code in the next step
-
Open the TwitchBot folder from this repository
-
Open twitchbot-data.json in a text editor (notepad, atom, notepad++ etc.)
-
Put the username of your twitchbot account you’ve created in between the quotation marks after the *"username": *
-
Put your oauth code in between the quotation marks after "password":
-
Put the channel name of the channel you would like your bot to join in between the quotation marks after "joinChannel":
-
You can also change the cooldown time for either songs or users, these values are in seconds
-
Save the file and close the text editor
-
Run twitchbot-starter.bat, it should be showing some of the songs in your playlist
-
It now should be working, go to the twitch channel you added the bot to and write !ping in chat, it should respond with pong!, you can also see the chat in the twitchbot window
-
Try requesting a song from your playlist, it now should be working
-
If it’s adding the wrong song to the queue, make sure you’ve got the correct playlist active when you launch the bot, try restarting the bot
-
If it’s not adding any song at all please first try to restart the bot, if it still doesn’t work ask for help
If you have any other problems please make an issue at here or tweet me @MichielP1807!