mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
- Update docstring of KeyboardButton
- Fix PollAnswer model and export it from `aiogram.types` - Fix dispatcher poll_answer handlers registration - Add actions to LoggingMiddleware
This commit is contained in:
parent
a8debbba04
commit
ca9a4440d1
5 changed files with 25 additions and 6 deletions
|
|
@ -45,7 +45,7 @@ from .passport_element_error import PassportElementError, PassportElementErrorDa
|
|||
PassportElementErrorSelfie
|
||||
from .passport_file import PassportFile
|
||||
from .photo_size import PhotoSize
|
||||
from .poll import PollOption, Poll
|
||||
from .poll import PollOption, Poll, PollAnswer
|
||||
from .pre_checkout_query import PreCheckoutQuery
|
||||
from .reply_keyboard import KeyboardButton, ReplyKeyboardMarkup, ReplyKeyboardRemove
|
||||
from .response_parameters import ResponseParameters
|
||||
|
|
@ -147,6 +147,7 @@ __all__ = (
|
|||
'PassportFile',
|
||||
'PhotoSize',
|
||||
'Poll',
|
||||
'PollAnswer',
|
||||
'PollOption',
|
||||
'PreCheckoutQuery',
|
||||
'ReplyKeyboardMarkup',
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class PollAnswer(base.TelegramObject):
|
|||
https://core.telegram.org/bots/api#pollanswer
|
||||
"""
|
||||
poll_id: base.String = fields.Field()
|
||||
user: User = fields.Field()
|
||||
user: User = fields.Field(base=User)
|
||||
option_ids: typing.List[base.Integer] = fields.ListField()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -93,9 +93,13 @@ class ReplyKeyboardMarkup(base.TelegramObject):
|
|||
|
||||
class KeyboardButton(base.TelegramObject):
|
||||
"""
|
||||
This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive.
|
||||
Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.
|
||||
Note: request_poll option will only work in Telegram versions released after 23 January, 2020. Older clients will receive unsupported message.
|
||||
This object represents one button of the reply keyboard.
|
||||
For simple text buttons String can be used instead of this object to specify text of the button.
|
||||
Optional fields request_contact, request_location, and request_poll are mutually exclusive.
|
||||
Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016.
|
||||
Older clients will ignore them.
|
||||
Note: request_poll option will only work in Telegram versions released after 23 January, 2020.
|
||||
Older clients will receive unsupported message.
|
||||
|
||||
https://core.telegram.org/bots/api#keyboardbutton
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue