mirror of
https://github.com/v2board/v2board.git
synced 2025-02-11 16:00:27 +08:00
fix
This commit is contained in:
parent
593066f9de
commit
a6bcc3f153
@ -39,9 +39,10 @@ class TelegramController extends Controller
|
|||||||
|
|
||||||
private function getMessage(array $data)
|
private function getMessage(array $data)
|
||||||
{
|
{
|
||||||
if (!isset($data['message']['text'])) return false;
|
if (!isset($data['message'])) return false;
|
||||||
$obj = new \StdClass();
|
$obj = new \StdClass();
|
||||||
$obj->is_private = $data['message']['chat']['type'] === 'private' ? true : false;
|
$obj->is_private = $data['message']['chat']['type'] === 'private' ? true : false;
|
||||||
|
if (!isset($data['message']['text'])) return false;
|
||||||
$text = explode(' ', $data['message']['text']);
|
$text = explode(' ', $data['message']['text']);
|
||||||
$obj->command = $text[0];
|
$obj->command = $text[0];
|
||||||
$obj->args = array_slice($text, 1);
|
$obj->args = array_slice($text, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user