[英]How to send message in telebot.py with None text?
API says that you can't send message with no text but i have to show keyboard to user due to: API 说您无法发送没有文本的消息,但我必须向用户显示键盘,因为:
bot.send_message(id, text, markup = keyboard)
So how can i change keyboard or send another with no text?那么我怎样才能更改键盘或发送另一个没有文字的键盘?
You cannot update KeyboardButtons
without sending texts.您无法在不发送文本的情况下更新
KeyboardButtons
。
Workaround,解决方法,
disable_notification=True
, so user won't be notified of this message).disable_notification=True
,因此不会通知用户此消息)。 Buttons will be updatedUPDATE更新
Deleting the message actually deletes the button too.删除消息实际上也删除了按钮。
editReplyMarkup
doesnot work on ReplyKeyboardMarkup
(the normal keyboard buttons) editReplyMarkup
用于ReplyKeyboardMarkup
(普通键盘按钮)
You can use InlineKeyboardButtons
, which can be edited (this is what I am using)您可以使用可以编辑的
InlineKeyboardButtons
(这是我正在使用的)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.