Skip to content

Add request_poll support to KeyboardButton#158

Open
store-x wants to merge 5 commits intoMayuri-Chan:mainfrom
store-x:main
Open

Add request_poll support to KeyboardButton#158
store-x wants to merge 5 commits intoMayuri-Chan:mainfrom
store-x:main

Conversation

@store-x
Copy link

@store-x store-x commented Sep 26, 2025

Summary

This PR adds support for the request_poll parameter in the KeyboardButton class. This allows bots to create buttons that can prompt users to send polls directly from the chat.

Details

  • Added request_poll parameter to KeyboardButton.
  • Supports KeyboardButtonPollType for specifying poll types (regular or quiz).
  • Matches the Telegram Bot API feature for poll requests.
  • Enables private chat poll creation popup via buttons, which was previously unsupported in PyroFork.

Example

from pyrogram.types import KeyboardButton, KeyboardButtonPollType

button = KeyboardButton(
    text="Create Poll",
    request_poll=KeyboardButtonPollType(is_quiz=True)
)

@store-x
Copy link
Author

store-x commented Dec 15, 2025

@Mayuri-Chan ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant