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

scl*_*ero 7 php keyboard message telegram-bot

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

在此输入图像描述

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

在此输入图像描述

代码是这样的:

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

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

我试过太空或类似的html实体,但我没有成功.

有办法做到这一点?

谢谢.

小智 8

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


and*_*rea 2

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

考虑一下:

https://api.telegram.org/botYOURTOKEN/sendMessage?chat_id=ID&text=
Run Code Online (Sandbox Code Playgroud)

由于连空格都不被接受,因此没有其他字符可以被编码来表示“虚无”。