1
我想补充像下面进入我的电报BOT消息自定义按钮,但我不知道如何将它们嵌入到我的信息与PythonPython的按钮选项
我想嵌入它进入此消息
def run(results, index, msgText):
# The message below this!
msg = '<b>Hello there, ' + results[index]['message']['from']['username'] + '!</b> I am <b>Makuna Hattata</b>, a spin-off bot of the original <b>Hakuna Mattata</b> bot \n\nI am a semi-smart bot capable of understanding basic commands, which you can see by pressing the button below!'
try:
sendMessage(index, results, msg, '&parse_mode=html')
logWorked(results[index]['message']['from']['username'], results[index]['message']['from']['id'], "/start message sent")
except Exception as err:
logError(results[index ]['message']['from']['username'], results[index]['message']['from']['id'], "/start message sent", err)
任何没有API的方法吗?我试图不使用API。 – Splinxyy
我添加了一些代码,看看它是否能解决你的问题。 – cookiedough
因此,缩短了,我把它发送到sendmessage的'reply_markup'参数中? – Splinxyy