Commit 5cb0eba0 authored by Jack'lul's avatar Jack'lul

Add isRunCommands() method

parent 6c3e463e
......@@ -130,6 +130,13 @@ class Telegram
*/
protected $botan_enabled = false;
/**
* Check if runCommands() is running in this session
*
* @var boolean
*/
protected $run_commands = false;
/**
* Telegram constructor.
*
......@@ -896,6 +903,7 @@ class Telegram
throw new TelegramException('No command(s) provided!');
}
$this->run_commands = true;
$this->botan_enabled = false; // Force disable Botan.io integration, we don't want to track self-executed commands!
$result = Request::getMe()->getResult();
......@@ -935,4 +943,14 @@ class Telegram
$this->executeCommand($this->update->getMessage()->getCommand());
}
}
/**
* Is this session initiated by runCommands()
*
* @return string
*/
public function isRunCommands()
{
return $this->run_commands;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment