@@ -123,13 +123,6 @@ class Telegram
123123 */
124124 protected $ last_command_response ;
125125
126- /**
127- * Botan.io integration
128- *
129- * @var boolean
130- */
131- protected $ botan_enabled = false ;
132-
133126 /**
134127 * Check if runCommands() is running in this session
135128 *
@@ -527,19 +520,9 @@ public function executeCommand($command)
527520 //Handle a generic command or non existing one
528521 $ this ->last_command_response = $ this ->executeCommand ('generic ' );
529522 } else {
530- //Botan.io integration, make sure only the actual command user executed is reported
531- if ($ this ->botan_enabled ) {
532- Botan::lock ($ command );
533- }
534-
535523 //execute() method is executed after preExecute()
536524 //This is to prevent executing a DB query without a valid connection
537525 $ this ->last_command_response = $ command_obj ->preExecute ();
538-
539- //Botan.io integration, send report after executing the command
540- if ($ this ->botan_enabled ) {
541- Botan::track ($ this ->update , $ command );
542- }
543526 }
544527
545528 return $ this ->last_command_response ;
@@ -905,16 +888,16 @@ protected function ucfirstUnicode($str, $encoding = 'UTF-8')
905888 /**
906889 * Enable Botan.io integration
907890 *
891+ * @deprecated Botan.io service is no longer working
892+ *
908893 * @param string $token
909894 * @param array $options
910895 *
911896 * @return \Longman\TelegramBot\Telegram
912- * @throws \Longman\TelegramBot\Exception\TelegramException
913897 */
914898 public function enableBotan ($ token , array $ options = [])
915899 {
916- Botan::initializeBotan ($ token , $ options );
917- $ this ->botan_enabled = true ;
900+ trigger_error ('Longman\TelegramBot\Telegram::enableBotan is deprecated and will be removed in future release. ' , E_USER_DEPRECATED );
918901
919902 return $ this ;
920903 }
@@ -947,7 +930,6 @@ public function runCommands($commands)
947930 }
948931
949932 $ this ->run_commands = true ;
950- $ this ->botan_enabled = false ; // Force disable Botan.io integration, we don't want to track self-executed commands!
951933
952934 $ result = Request::getMe ();
953935
0 commit comments