hello .. I wrote this feature is still experimental and in spite of the action seems to work well
function ctgame_command( $userid, $text ) {
$tl = telegram_getid( $userid );
if ( !$tl ) return;
$args = explode(" ", $text);
$cmd = $args[0];
switch ($cmd) {
case "/text":
ctgame_sendmessage($userid, "Comando selezionato $cmd"."\n");
break;
case "/email":
ctgame_sendmessage($userid, "Comando selezionato $cmd"."\n");
break;
case "/track":
ctgame_sendmessage($userid, "Comando selezionato $cmd"."\n");
break;
default:
break;
}
}