开放电报机器人聊天无启动命令
电报机器人如何在没有启动命令的情况下打开自机器人聊天,在andercallbackquery方法中响应内联按钮?
这打开了bot的聊天,但是将“/start”附加到聊天中,
https://t.me/<bot-name>?start=<start-parameter>
这是一个打开bot的聊天,而无需附加“/start”。但是在我看来,比正确的方法更像是一个错误。
https://t.me/<bot-name>?start=a:b
此其他报告url_invalid:
https://t.me/<bot-name>?start=
https://t.me/<bot-name>?start
https://t.me/<bot-name>?
https://t.me/<bot-name>
https://t.me/<bot-name>/
How can a telegram bot open self bot chat without start command, in answerCallbackQuery method, responding to inline buttons?
This opens bot's chat, but appends "/start" into chat
https://t.me/<bot-name>?start=<start-parameter>
This one opens bot's chat without appending "/start". But seems to me more of a bug than a correct way.
https://t.me/<bot-name>?start=a:b
This other ones report URL_INVALID:
https://t.me/<bot-name>?start=
https://t.me/<bot-name>?start
https://t.me/<bot-name>?
https://t.me/<bot-name>
https://t.me/<bot-name>/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不可能使用命令而不是
/start
重定向到机器人的聊天。机器人URL中唯一接受的2个参数是:start
用于启动私人聊天中的bot,startgroup
startgroup 允许用户选择一个组来启动该组bot in。还有一些需要注意的东西:它们的值将在
/start
之后的空间之后附加。例如,如果您的URL为t.me/yourbot?start=A,则您的机器人将获得文本/start a
的消息。It is not possible to redirect to the bot's chat with a command rather than
/start
. The only 2 parameters that are accepted in the bot URL are:start
which is for starting the bot in private chat, andstartgroup
which lets the user choose a group to start the bot in.And there's something to be aware of: Their values will be appended after a space after the
/start
. For example if your URL is t.me/yourbot?start=a, your bot will get a message with the text/start a
.