• Hey Guest, we're evolving the future of TeaSpeak.
    You're invited to join the discussion here!

Twitch integration

h1web

Well-known member
Hello,

it would be cool to integrade the Twitch Feature that is built into the Tea*Speak Servers.

Greetings!
 

Pamonha

Well-known member
Premium User
I do not know if the playback of an integration should be different. The way to do in Tea*Speak, is not being supported in teaspeak?

As in other cases modules such as WHMCS, sinusbot and even website have worked well.
 

WolverinDEV

TeaSpeak Team
Staff member
Administrator
There is a barley no chance that this will ever come, because twich integration is related to other Tea*Speak services and not only to the server :)
 

Kevinos

Fanatic member
Premium User
You can do this kind of script, a quick example.

you must create an application on the twitch API with the link of your script, and create a cron job to send a message to the users when a stream is launched..


PHP:
<?php
require_once("../libraries/TeamSpeak3/TeamSpeak3.php");
$ts3_ServerInstance = TeamSpeak3::factory("serverquery://serveradmin:password@serverip:queryport/?server_port=serverport");

                $streamer = 'Test123';
                function is_channel_live($channel) {
                    $request = json_decode(@file_get_contents( 'https://api.twitch.tv/kraken/streams/' . $channel ));
                    return ( ! is_null( $request->stream ) ) ? TRUE : FALSE;
                }
                if(is_channel_live($streamer))

foreach($ts3_ServerInstance->clientList() as $ts3_Client)
{
   $ts3_Client->message("[URL]https://www.twitch.tv/$channel[/URL] is streaming blablabla");
  }
                else
                    echo "Is not streaming";
            ?>

I did not test, I do not have a Twitch account ;)
 

Grid

Member
You can do this kind of script, a quick example.

you must create an application on the twitch API with the link of your script, and create a cron job to send a message to the users when a stream is launched..


PHP:
<?php
require_once("../libraries/TeamSpeak3/TeamSpeak3.php");
$ts3_ServerInstance = TeamSpeak3::factory("serverquery://serveradmin:password@serverip:queryport/?server_port=serverport");

                $streamer = 'Test123';
                function is_channel_live($channel) {
                    $request = json_decode(@file_get_contents( 'https://api.twitch.tv/kraken/streams/' . $channel ));
                    return ( ! is_null( $request->stream ) ) ? TRUE : FALSE;
                }
                if(is_channel_live($streamer))

foreach($ts3_ServerInstance->clientList() as $ts3_Client)
{
   $ts3_Client->message("[URL]https://www.twitch.tv/$channel[/URL] is streaming blablabla");
  }
                else
                    echo "Is not streaming";
            ?>

I did not test, I do not have a Twitch account ;)
I think most of the people asking around for the TeamSpeak Twitch integration to be added to TeaSpeak are asking for it because of its "auto-assignment to group" feature which adds users to groups based on viewers, subscribers, VIPs, moderators and streamers groups on Twitch.
 

WolverinDEV

TeaSpeak Team
Staff member
Administrator
//Closed.
Twitch integration will not come. The main reason why it: Query.
Managing client via some kind of bot has much more possibilities than some hard coded stuff.