oHttp = new Http(); $this->oTGHttp = new TGHttp(); $this->oTGHttp->sApiToken = env("telegram_token"); $this->oTGHttp->sApiChatId = env("telegram_chatid"); } // protected function sendMessage($sText = '?') { // // if (env('is_loc') === true) { // echo "
";
// var_dump($sText);
// } else {
// $url = "https://api.telegram.org/bot$this->sApiToken/sendMessage?chat_id=$this->sApiChatId&text=" . urlencode($sText);
// file_get_contents($url);
// }
//
// }
protected function cmdGood($sCmd) {
$sCmdNew = "";
switch ($sCmd) {
case "user":
$sCmdNew = "user_name";
break;
case "project":
$sCmdNew = "project_name";
break;
case "code":
$sCmdNew = "sale_code";
break;
case "condition":
$sCmdNew = "cron_condition";
break;
default:
$sCmdNew = $sCmd;
break;
}
return $sCmdNew;
}
}