Hi TS3 programmers community
Im making a project that allows to X user of the server to interact, on the private chat, with a bot.
The system that I have on my mind is the following one:
(The following code is an example xddd)
PHP Code:
//Wait for a message event...
If ($message == "!help"){
send_this_message_to_the_client("Dont worry, I will help you :-)... Tell me what is your problem. 1 or 2");
//Wait for answer
if ($problem == "1"){
send_this_message_to_the_client("Your problem is 1 :-)... Tell me what is your sex. man or girl");
//Wait for answer
if ($sex == "man"){
send_this_message_to_the_client("You are a man :-)...");
$sex == "girl"){
send_this_message_to_the_client("You are a girl :-)...");
    }elseif (
$problem == "2") {
send_this_message_to_the_client("Your problem is 2 :-)... Tell me what do you like. mans or girls");
//Wait for answer
if ($like == "mans"){
send_this_message_to_the_client("You like mans :-)...");
        }elseif (
$like == "girls"){
send_this_message_to_the_client("You like girls :-)...");


The most important part of the php function that Im using to make this is the following one:
PHP Code:
function onTextmessage(TeamSpeak3_Adapter_ServerQuery_Event $eventTeamSpeak3_Node_Host $host)
$type $event->getType();
$data $event->getData();
$server $host->serverGetSelected();
$date date("Y-m-d H:i:s");
$client_data = array(
'response' => array(
'event' => "onTextmessage",
'type' => null,
'date' => $date,
'data' => array(
'targetmode' => $data['targetmode'],
'msg' => $data['msg'],
'target' => $data['target'],
'clid' => $data['invokerid'],
'client_nickname' => $data['invokername'],
'client_unique_identifier' => $data['invokeruid']
$json json_encode($client_data);

Do you have any idea of how to make this?