You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在Telegram Bot中使用KeyboardButtonRequestPeer选择联系人?

Telegram Bot KeyboardButtonRequestPeer 联系人选择功能问题

我正在开发一款Telegram Bot,尝试实现通过KeyboardButtonRequestPeer功能选择联系人的功能,但当前方案遇到了问题。

  • 选择收件人界面
  • 点击“选择收件人”后界面

我目前尝试的方法是:调用click(share_phone=True)。机器人返回的数据如下:

[Message(id=471025, peer_id=PeerUser(user_id=6343432495), date=datetime.datetime(2023, 9, 7, 16, 20, 53, tzinfo=datetime.timezone.utc), message='(Select a contact from the keyboard below)', out=False, mentioned=False, media_unread=False, silent=False, post=False, from_scheduled=False, legacy=False, edit_hide=False, pinned=False, noforwards=False, from_id=None, fwd_from=None, via_bot_id=None, reply_to=None, media=None, reply_markup=ReplyKeyboardMarkup(rows=[KeyboardButtonRow(buttons=[KeyboardButtonRequestPeer(text='Select a Recipient', button_id=123, peer_type=RequestPeerTypeUser(bot=None, premium=None))])], resize=False, single_use=True, selective=False, persistent=False, placeholder=None), entities=[], views=None, forwards=None, replies=None, edit_date=None, post_author=None, grouped_id=None, reactions=None, restriction_reason=[], ttl_period=None), total=104]

内容的提问来源于stack exchange,提问作者Puffer

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.11 15:22:07