$from_chattitle = $message["message"]["chat"]["first_name"]; } //get chat tittle for private chat.. if ($conf["debug"]) { if (isset($message["message"]["chat"]["id"])) { echo "\n>>> Debug chatID: " . $message["message"]["chat"]["id"]; echo "\n*** Ok, take a note of your chatID. Now disable debug and set debug_chatid on your config.ini\n\n"; } die; } if (isset($message["message"]["text"])) { $text = $message["message"]["text"]; //get text of a message $chat_type = $message["message"]["chat"]["type"]; //chat type = group, private.. if (i::file_checkstring($conf["replieds"], $update_id) != true) { //check and ignore replieds $str_id = 1; echo $from_chatid . ":" . $update_id . ":" . $from . ": " . $text . "\n"; $reply = b::reply_get($text, $from, $str_id, $pp = false, $custom); //GENERATE A REPLY TEXT BASED ON YOUR TRIGGER AND BAD WORDS, SEE/EDIT reply_get() ON src/classes.php if ($chat_type != "private") { if (strpos($text, $conf["trigger"]) === false and $pvt == true) { i::fwrite_a($conf["replieds"], $update_id . "\r\n"); return false; } $reply = $from . " " . $reply; } echo "replying > {$reply}"; $reply = urlencode($reply); //encode reply text to use on HTTP POST