@@ -123,13 +123,6 @@ class Telegram
123
123
*/
124
124
protected $ last_command_response ;
125
125
126
- /**
127
- * Botan.io integration
128
- *
129
- * @var boolean
130
- */
131
- protected $ botan_enabled = false ;
132
-
133
126
/**
134
127
* Check if runCommands() is running in this session
135
128
*
@@ -527,19 +520,9 @@ public function executeCommand($command)
527
520
//Handle a generic command or non existing one
528
521
$ this ->last_command_response = $ this ->executeCommand ('generic ' );
529
522
} 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
-
535
523
//execute() method is executed after preExecute()
536
524
//This is to prevent executing a DB query without a valid connection
537
525
$ 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
- }
543
526
}
544
527
545
528
return $ this ->last_command_response ;
@@ -905,16 +888,16 @@ protected function ucfirstUnicode($str, $encoding = 'UTF-8')
905
888
/**
906
889
* Enable Botan.io integration
907
890
*
891
+ * @deprecated Botan.io service is no longer working
892
+ *
908
893
* @param string $token
909
894
* @param array $options
910
895
*
911
896
* @return \Longman\TelegramBot\Telegram
912
- * @throws \Longman\TelegramBot\Exception\TelegramException
913
897
*/
914
898
public function enableBotan ($ token , array $ options = [])
915
899
{
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 );
918
901
919
902
return $ this ;
920
903
}
@@ -947,7 +930,6 @@ public function runCommands($commands)
947
930
}
948
931
949
932
$ this ->run_commands = true ;
950
- $ this ->botan_enabled = false ; // Force disable Botan.io integration, we don't want to track self-executed commands!
951
933
952
934
$ result = Request::getMe ();
953
935
0 commit comments