KeyboardButtonRequestPeer
- class pyrogram.raw.types.KeyboardButtonRequestPeer
Prompts the user to select and share one or more peers with the bot using messages.sendBotRequestedPeer
Constructor of
KeyboardButton.- Details:
Layer:
223ID:
5B0F15F5
- Parameters:
text (
str) – Button textbutton_id (
int32-bit) – Button ID, to be passed to messages.sendBotRequestedPeer.peer_type (
RequestPeerType) – Filtering criteria to use for the peer selection list shown to the user. The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.max_quantity (
int32-bit) – Maximum number of peers that can be chosen.style (
KeyboardButtonStyle, optional)
TL Schema
keyboardButtonRequestPeer#5b0f15f5
flags:#
style:flags.10?KeyboardButtonStyle
text:string
button_id:int
peer_type:RequestPeerType
max_quantity:int
= KeyboardButton
Parameter Tree
KeyboardButtonRequestPeer
├── style →
KeyboardButtonStyle (optional)│ └──
KeyboardButtonStyle│ ├── bg_primary →
true (optional)│ ├── bg_danger →
true (optional)│ ├── bg_success →
true (optional)│ └── icon →
long (optional)├── text →
string├── button_id →
int├── peer_type →
RequestPeerType│ ├──
RequestPeerTypeUser│ │ ├── bot →
Bool (optional)│ │ └── premium →
Bool (optional)│ ├──
RequestPeerTypeChat│ │ ├── creator →
true (optional)│ │ ├── bot_participant →
true (optional)│ │ ├── has_username →
Bool (optional)│ │ ├── forum →
Bool (optional)│ │ ├── user_admin_rights →
ChatAdminRights (optional)│ │ │ └──
ChatAdminRights│ │ │ ├── change_info →
true (optional)│ │ │ ├── post_messages →
true (optional)│ │ │ ├── edit_messages →
true (optional)│ │ │ ├── delete_messages →
true (optional)│ │ │ ├── ban_users →
true (optional)│ │ │ ├── invite_users →
true (optional)│ │ │ ├── pin_messages →
true (optional)│ │ │ ├── add_admins →
true (optional)│ │ │ ├── anonymous →
true (optional)│ │ │ ├── manage_call →
true (optional)│ │ │ ├── other →
true (optional)│ │ │ ├── manage_topics →
true (optional)│ │ │ ├── post_stories →
true (optional)│ │ │ ├── edit_stories →
true (optional)│ │ │ ├── delete_stories →
true (optional)│ │ │ ├── manage_direct_messages →
true (optional)│ │ │ └── manage_ranks →
true (optional)│ │ └── bot_admin_rights →
ChatAdminRights (optional)│ │ └──
ChatAdminRights│ │ ├── change_info →
true (optional)│ │ ├── post_messages →
true (optional)│ │ ├── edit_messages →
true (optional)│ │ ├── delete_messages →
true (optional)│ │ ├── ban_users →
true (optional)│ │ ├── invite_users →
true (optional)│ │ ├── pin_messages →
true (optional)│ │ ├── add_admins →
true (optional)│ │ ├── anonymous →
true (optional)│ │ ├── manage_call →
true (optional)│ │ ├── other →
true (optional)│ │ ├── manage_topics →
true (optional)│ │ ├── post_stories →
true (optional)│ │ ├── edit_stories →
true (optional)│ │ ├── delete_stories →
true (optional)│ │ ├── manage_direct_messages →
true (optional)│ │ └── manage_ranks →
true (optional)│ └──
RequestPeerTypeBroadcast│ ├── creator →
true (optional)│ ├── has_username →
Bool (optional)│ ├── user_admin_rights →
ChatAdminRights (optional)│ │ └──
ChatAdminRights│ │ ├── change_info →
true (optional)│ │ ├── post_messages →
true (optional)│ │ ├── edit_messages →
true (optional)│ │ ├── delete_messages →
true (optional)│ │ ├── ban_users →
true (optional)│ │ ├── invite_users →
true (optional)│ │ ├── pin_messages →
true (optional)│ │ ├── add_admins →
true (optional)│ │ ├── anonymous →
true (optional)│ │ ├── manage_call →
true (optional)│ │ ├── other →
true (optional)│ │ ├── manage_topics →
true (optional)│ │ ├── post_stories →
true (optional)│ │ ├── edit_stories →
true (optional)│ │ ├── delete_stories →
true (optional)│ │ ├── manage_direct_messages →
true (optional)│ │ └── manage_ranks →
true (optional)│ └── bot_admin_rights →
ChatAdminRights (optional)│ └──
ChatAdminRights│ ├── change_info →
true (optional)│ ├── post_messages →
true (optional)│ ├── edit_messages →
true (optional)│ ├── delete_messages →
true (optional)│ ├── ban_users →
true (optional)│ ├── invite_users →
true (optional)│ ├── pin_messages →
true (optional)│ ├── add_admins →
true (optional)│ ├── anonymous →
true (optional)│ ├── manage_call →
true (optional)│ ├── other →
true (optional)│ ├── manage_topics →
true (optional)│ ├── post_stories →
true (optional)│ ├── edit_stories →
true (optional)│ ├── delete_stories →
true (optional)│ ├── manage_direct_messages →
true (optional)│ └── manage_ranks →
true (optional)└── max_quantity →
intExample
KeyboardButtonRequestPeer(
text="Open",
button_id=0,
peer_type=RequestPeerTypeUser(),
max_quantity=0,
)