如何在电报机器人中发送空消息?

时间:2017-09-16 15:52:54

标签: php keyboard message telegram-bot

我的电报机器人中有这个键盘:

enter image description here

当我点击右箭头时,我会得到这个新键盘:

enter image description here

代码是这样的:

    $url = $GLOBALS["website"]."/sendMessage?chat_id=".$chatID."&text=''&parse_mode=html&reply_markup=".json_encode($keyboard3);
    file_get_contents($url);

我知道sendmessage方法中需要该文本,但我正在搜索一种方法或解决方法来发送空消息。

我尝试过使用太空或类似的html实体,但我没有成功。

有办法做到这一点吗?

谢谢。

3 个答案:

答案 0 :(得分:4)

您现在无法发送空消息,这是零宽度空间和RTL(从右到左)控制字符的错误,但它现在无法发送

答案 1 :(得分:3)

您可以在数字键盘中尝试Alt + 0173。 按住Alt键,然后依次单击0、1、7、3。

答案 2 :(得分:1)

我认为没有办法做你想做的事。

考虑一下:

https://api.telegram.org/botYOURTOKEN/sendMessage?chat_id=ID&text=

由于甚至不接受空格,因此没有其他字符可以编码来表示“#4;虚无"。

相关问题