Robus Twitch Category Changer

Description

A while ago I was trying to use a !setgame command to update my Category in Twitch to “Thank Goodness You’re Here!” and it wouldn’t work, no matter how I typed it. The game was present in the Creator Dashboard when I searched, but chat commands refused to work. So I coded up a robust way of doing it.
It requires you to create an App in Twitch Dev in order to get a Client ID and Client Secret, and trust me, it’s easier than it sounds.

Video Tutorial

Step-by-step video showing you how to get the Client ID and Secret as per the IGDB Docs, how to store them in Streamerbot, and how to install and test the extension.

Download File

Robust Category Changer.sb (6.1 KB)

Installation

  1. First we need to get a Client ID and Client Secret from Twitch, you can do that by following this tutorial, or following the video above:

The Internet Game Database API website has step by step instructions on how-to get a Client ID and Client Secret: https://api-docs.igdb.com/#getting-started

  1. Next we need to add the Client ID, and Client Secret to our Variables in Streamer.bot




    Add the string of text into the according Value box for each and click “Ok” once you’re done.

  2. In Streamer.bot click the Import button in the top menu. Drag the .sb file into the Import String field.

  3. Your Action should have imported, and should look something like this!

  4. Remember to go to your ‘Commands’ tab and Right Click → Enable the newly created “Change Category” action.

  5. You’re done! Assuming your Streamer.bot is hooked up to your Twitch Channel correctly, you should be able to change the category simply by typing something like:

!setgame Just Chatting

or

!changegame Halo 3

Happy Category changing!

A few things you could probably consider, there is no direct need to create a developer key etc, you should be able to use:

string tokenValue = CPH.TwitchOAuthToken;
string clientIdValue = CPH.TwitchClientId;

which are methods build into Streamer.bot. Another thing I recommend looking into would be the following, as you are currently using “using HttpClient” and should be changed to accordingly:

1 Like