I’m using tmi js and making my own bot for my channel. I was looking at events and commands. I just want to change stream title and stream game names. But i couldn’t see anything. I’ve checked the documents, but I don’t know how to use it. Can you please help me.
And one more things.
Can i add shortcut to !game.
For example:
When i write !game pubg, then set the game playerunknown’s battlegrounds. Something like that.
You can update a streams game and title through the Twitch API using the Update Channel endpoint, but if you want to do it through a 3rd party library like TMI.js then you’ll have to follow their docs and contact them for support if you need it.
As for shortcuts, you can program commands to do whatever you want.
The docs for how to listen to Chat events: https://docs.tmijs.org/v1.2.1/Events.html#chat
Where it says // Do your stuff. in their example, that’s where you’ll put your code for your commands, such as !game, if you want to be able to use something like ‘pubg’ instead of the games full name, then you’ll have to have to make a list yourself of the games full names (as that’s what the API requires), and the games shorthand that you want to use in your command.
Hi again. I’ve reviewed your sources. But sadly I can’t make Curl request. My code fails or doesn’t work directly. All I want is to be able to add title and! Game commands. I’ve tried all the codes I’ve found. Please help.