mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added full support for the Bot API 9.6 (#1792)
* Added full support for the Bot API 9.6 * Add support for `managed_bot` updates * Set `description_parse_mode` default to `"parse_mode"` and use `DateTime` for `addition_date` in `PollOption` * Update changelog with features and changes from Bot API 9.6 * Add changelog fragment generator and update poll parameter descriptions
This commit is contained in:
parent
00c1130938
commit
9f49c0413f
107 changed files with 3077 additions and 328 deletions
|
|
@ -30,6 +30,7 @@ from aiogram.types import (
|
|||
ChatMemberUpdated,
|
||||
ChosenInlineResult,
|
||||
InlineQuery,
|
||||
ManagedBotUpdated,
|
||||
Message,
|
||||
MessageReactionCountUpdated,
|
||||
MessageReactionUpdated,
|
||||
|
|
@ -380,13 +381,14 @@ class TestDispatcher:
|
|||
id="poll id",
|
||||
question="Q?",
|
||||
options=[
|
||||
PollOption(text="A1", voter_count=2),
|
||||
PollOption(text="A2", voter_count=3),
|
||||
PollOption(persistent_id="1", text="A1", voter_count=2),
|
||||
PollOption(persistent_id="2", text="A2", voter_count=3),
|
||||
],
|
||||
is_closed=False,
|
||||
is_anonymous=False,
|
||||
type="quiz",
|
||||
allows_multiple_answers=False,
|
||||
allows_revoting=False,
|
||||
total_voter_count=0,
|
||||
correct_option_id=1,
|
||||
),
|
||||
|
|
@ -402,6 +404,7 @@ class TestDispatcher:
|
|||
poll_id="poll id",
|
||||
user=User(id=42, is_bot=False, first_name="Test"),
|
||||
option_ids=[42],
|
||||
option_persistent_ids=["1"],
|
||||
),
|
||||
),
|
||||
False,
|
||||
|
|
@ -600,6 +603,18 @@ class TestDispatcher:
|
|||
False,
|
||||
True,
|
||||
),
|
||||
pytest.param(
|
||||
"managed_bot",
|
||||
Update(
|
||||
update_id=42,
|
||||
managed_bot=ManagedBotUpdated(
|
||||
user=User(id=42, is_bot=False, first_name="Test"),
|
||||
bot_user=User(id=100, is_bot=True, first_name="ManagedBot"),
|
||||
),
|
||||
),
|
||||
False,
|
||||
True,
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_listen_update(
|
||||
|
|
@ -655,13 +670,14 @@ class TestDispatcher:
|
|||
id="poll id",
|
||||
question="Q?",
|
||||
options=[
|
||||
PollOption(text="A1", voter_count=2),
|
||||
PollOption(text="A2", voter_count=3),
|
||||
PollOption(persistent_id="1", text="A1", voter_count=2),
|
||||
PollOption(persistent_id="2", text="A2", voter_count=3),
|
||||
],
|
||||
is_closed=False,
|
||||
is_anonymous=False,
|
||||
type="quiz",
|
||||
allows_multiple_answers=False,
|
||||
allows_revoting=False,
|
||||
total_voter_count=0,
|
||||
correct_option_id=0,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue