Commit f1f4c75e authored by LONGMAN's avatar LONGMAN

Fixed unknown command bug

parent 2b293902
...@@ -30,7 +30,7 @@ class Telegram ...@@ -30,7 +30,7 @@ class Telegram
* *
* @var string * @var string
*/ */
protected $version = '0.0.7'; protected $version = '0.0.8';
/** /**
* Telegram API key * Telegram API key
...@@ -318,6 +318,10 @@ class Telegram ...@@ -318,6 +318,10 @@ class Telegram
} }
$class_name = __NAMESPACE__ . '\\Commands\\' . $class_name; $class_name = __NAMESPACE__ . '\\Commands\\' . $class_name;
if (!class_exists($class_name)) {
return false;
}
$class = new $class_name($this); $class = new $class_name($this);
if (!empty($update)) { if (!empty($update)) {
$class->setUpdate($update); $class->setUpdate($update);
......
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