diff --git a/aiogram/types/poll.py b/aiogram/types/poll.py index 16f83634..84fde48d 100644 --- a/aiogram/types/poll.py +++ b/aiogram/types/poll.py @@ -38,6 +38,6 @@ class Poll(base.TelegramObject): total_voter_count: base.Integer = fields.Field() is_closed: base.Boolean = fields.Field() is_anonymous: base.Boolean = fields.Field() - poll_type: base.String = fields.Field(alias="type") + type: base.String = fields.Field() allows_multiple_answers: base.Boolean = fields.Field() correct_option_id: base.Integer = fields.Field() diff --git a/aiogram/types/reply_keyboard.py b/aiogram/types/reply_keyboard.py index 4f4c2404..7d2283ec 100644 --- a/aiogram/types/reply_keyboard.py +++ b/aiogram/types/reply_keyboard.py @@ -10,10 +10,10 @@ class KeyboardButtonPollType(base.TelegramObject): https://core.telegram.org/bots/api#keyboardbuttonpolltype """ - poll_type: base.String = fields.Field(alias="type") + type: base.String = fields.Field() - def __init__(self, poll_type: base.String): - super(KeyboardButtonPollType, self).__init__(poll_type=poll_type) + def __init__(self, type: base.String): + super(KeyboardButtonPollType, self).__init__(type=type) class ReplyKeyboardMarkup(base.TelegramObject):