Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 电报内联键盘按钮不工作_Python_Heroku_Callback_Telegram - Fatal编程技术网

Python 电报内联键盘按钮不工作

Python 电报内联键盘按钮不工作,python,heroku,callback,telegram,Python,Heroku,Callback,Telegram,我的机器人通过电报将内联键盘发送给一个组。键盘发送时没有问题,但当用户单击时,电报没有响应。我已经使用heroku日志-t检查了我的heroku日志。电报上没有平安号。这是怎么发生的?这可能是电报方面的问题吗? 附加信息:所有其他功能正常工作 TELEGRAM_WEBSITE = "https://api.telegram.org/" + <BOT_TOKEN> response_body=requests.post(TELEGRAM_WEBSITE + &quo

我的机器人通过电报将内联键盘发送给一个组。键盘发送时没有问题,但当用户单击时,电报没有响应。我已经使用
heroku日志-t
检查了我的heroku日志。电报上没有平安号。这是怎么发生的?这可能是电报方面的问题吗?
附加信息:所有其他功能正常工作

TELEGRAM_WEBSITE = "https://api.telegram.org/" + <BOT_TOKEN>
response_body=requests.post(TELEGRAM_WEBSITE + "/sendmessage",
                              data={"text": "{}".format(TEXT), "parse_mode": "HTML",
                                    "chat_id": "{}".format(CHAT_ID),
                                    "reply_markup": json.dumps(
                                        {"inline_keyboard": [[{"text": "{}".format(BET_POSITION),
                                        "callback_data": "{};{};{};{};{};{}".format(BET_SUM,CHALLENGE_TYPE,RIVAL_TELE_ID,TELE_ID,BET_POSITION,USERNAME)}]]})})
response_body=response_body.json()
requests.post(TELEGRAM_WEBSITE + "/sendmessage?chat_id={}&text={}".format(<my telegram id>, response_body))
telegrame\u网站=”https://api.telegram.org/" + 
response\u body=requests.post(电报网站+“/sendmessage”,
数据={“文本”:“{}”。格式(文本),“解析模式”:“HTML”,
“聊天室id”:“{}”。格式(聊天室id),
“回复标记”:json.dumps(
{“内联键盘”:[[{“文本”:“{}”。格式(下注位置),
“回调数据”:“{};{};{};{};{};{};{}.”格式(下注金额、挑战类型、对手下注ID、下注ID、下注位置、用户名)}]})
response\u body=response\u body.json()
requests.post(telegrame\u WEBSITE+“/sendmessage?chat\u id={}和text={}”。格式(,响应正文))
^这是我寄来的钥匙板

{'ok': True, 'result': {'message_id': 769, 'from': {'id': <>, 'is_bot': True, 'first_name': '<bot name>', 'username': '<bot username>'}, 'chat': {'id': <group chai id >, 'title': '<group title>', 'username': '<group username>', 'type': 'supergroup'}, 'date': 1594645500, 'text': 'CHALLENGE-\nChallenged by:<my username>\nBet:500', 'entities': [{'offset': 27, 'length': 8, 'type': 'text_mention', 'user': {'id': <id>, 'is_bot': False, 'first_name': '<my first name>', 'username': '<my username>', 'language_code': 'en'}}], 'reply_markup': {'inline_keyboard': [[{'text': 'call', 'callback_data': '10;open;;<my telegram id>;9 bets;<my username>'}]]}}}
{'ok':True,'result':{'message_id':769',from':{'id':,'is_bot':True,'first_name':'','username':'','title':'','username':'','type':'supergroup','date':1594645500,'text':'CHALLENGE-\n质询者:\nBet:500,'entications':[{'offset':27,'length':8,'type':'text':'tension','user','{'id':,'is_bot':False,'first_name':'','username':'','language_code':'en'}],'reply_markup':{'inline_keyboard':[[[{'text':'call','call','callback_data':'10;open;;;9 bets;'}}}]
^以下是正在发送的
响应\u body
的确认信息。
第二个确认显然是我可以在手机上看到键盘。

问题来自电报方面。我更改了机器人令牌,键盘工作。

如果你不显示代码,我们帮不了你…@0stone0做到了。代码有500行,所以我只发布了相关部分。你是个英雄。哇,一个通讯员给半个b供电数以百万计的用户,需要撤销令牌才能使按钮正常工作。。。