Commit b2ad7c67 authored by Jack'lul's avatar Jack'lul

make sure the message begins with a command

parent 738f6756
......@@ -69,7 +69,7 @@ class Botan
if (isset($obj['message'])) {
$data = $obj['message'];
if ((isset($obj['message']['entities']) && $obj['message']['entities'][0]['type'] == 'bot_command') || substr($obj['message']['text'], 0, 1) == '/') {
if ((isset($obj['message']['entities']) && $obj['message']['entities'][0]['type'] == 'bot_command' && $obj['message']['entities'][0]['offset'] == 0) || substr($obj['message']['text'], 0, 1) == '/') {
if (strtolower($command) == 'generic') {
$command = 'Generic';
} elseif (strtolower($command) == 'genericmessage') {
......
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