我不知道如何工作代码,可能我有一个错误写入'选项'数组的错误。附加代码。我在"sendMessage"
中使用了相同的Elseif,并且完美工作。谢谢!
https://core.telegram.org/bots/api#sendpoll
'options' => array('A','B','C'),
这不起作用
'options' => [ "A", "B", "C" ]
elseif(strpos($ text,"/poll"(=== 0({
$parameters2 = array(
'chat_id' => $chatId,
'options' => array('A','B','C'),
'question' => "Select correct one",
);
sendButton('sendPoll', $parameters);
}
您可以在以下代码
下尝试此此操作。'options' => json_encode(array('A','B','C')),
代替
'options' => array('A','B','C'),