Closed yagizdo closed 5 years ago
You can accomplish this by using the docs for Twitch like I linked in the other issue (which you should have commented on rather than opening a new issue) (and I already gave you a solution and information for creating game aliases) here and combining with the bot script I wrote here.
I will not supply support for your project(s) here as it is clearly better suited on the Twitch Dev forums. This is not an issue with tmi.js.
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..
You don't have to make request using cURL, those are just very basic examples using command-line functions. Again, this is definitely for the Twitch forums -- nothing to do with tmi.js.
Here is an untested example of a request to update the status and game using the request package:
const request = require('request');
const clientID = '';
const channelID = '';
const oauthToken = '';
request({
url: 'https://api.twitch.tv/kraken/channels/' + channelID,
json: true,
method: 'put',
headers: {
'Client-ID': clientID,
Accept: 'application/vnd.twitchtv.v5+json',
Authorization: 'OAuth ' + oauthToken
},
body: {
channel: {
status: 'My new status',
game: 'Counter-Strike: Global Offensive'
}
}
}, (err, req, body) => {
if(err) {
console.error(err);
}
else {
console.log(body);
}
});
Thank you so much. And I'm sorry for asking so many questions.
Hi. I opened a topic at https://discuss.dev.twitch.tv. They suggested that I write here. I want to add! game and! title commands. I reviewed the Twitch documents, but I still didn't understand. How do I add these commands with tmi.js by following Twitch documents? Can you help with this?
Twitch Discuss ScreenShot :![image](https://user-images.githubusercontent.com/31064552/46737095-53a72a80-cca3-11e8-920a-f199a640409c.png)
Actual behaviour:
Expected behaviour:
Error log:
Server configuration