diff --git a/.butcher/enums/ReactionTypeType.yml b/.butcher/enums/ReactionTypeType.yml index 10e97c8d..d1c46cc1 100644 --- a/.butcher/enums/ReactionTypeType.yml +++ b/.butcher/enums/ReactionTypeType.yml @@ -9,3 +9,4 @@ multi_parse: entities: - ReactionTypeEmoji - ReactionTypeCustomEmoji + - ReactionTypePaid diff --git a/aiogram/enums/reaction_type_type.py b/aiogram/enums/reaction_type_type.py index 5b0b8804..f4b7c345 100644 --- a/aiogram/enums/reaction_type_type.py +++ b/aiogram/enums/reaction_type_type.py @@ -10,3 +10,4 @@ class ReactionTypeType(str, Enum): EMOJI = "emoji" CUSTOM_EMOJI = "custom_emoji" + PAID = "paid" diff --git a/aiogram/types/copy_text_button.py b/aiogram/types/copy_text_button.py index 5e4c4beb..98790b55 100644 --- a/aiogram/types/copy_text_button.py +++ b/aiogram/types/copy_text_button.py @@ -2,7 +2,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any -from aiogram.types import TelegramObject +from .base import TelegramObject class CopyTextButton(TelegramObject): diff --git a/aiogram/types/reaction_type_paid.py b/aiogram/types/reaction_type_paid.py index a6bbdace..c5c11c81 100644 --- a/aiogram/types/reaction_type_paid.py +++ b/aiogram/types/reaction_type_paid.py @@ -1,5 +1,6 @@ from typing import TYPE_CHECKING, Any, Literal +from ..enums import ReactionTypeType from .reaction_type import ReactionType @@ -10,7 +11,7 @@ class ReactionTypePaid(ReactionType): Source: https://core.telegram.org/bots/api#reactiontypepaid """ - type: Literal["paid"] = "paid" + type: Literal[ReactionTypeType.PAID] = ReactionTypeType.PAID """Type of the reaction, always 'paid'""" if TYPE_CHECKING: @@ -18,7 +19,10 @@ class ReactionTypePaid(ReactionType): # This section was auto-generated via `butcher` def __init__( - __pydantic__self__, *, type: Literal["paid"] = "paid", **__pydantic_kwargs: Any + __pydantic__self__, + *, + type: Literal[ReactionTypeType.PAID] = ReactionTypeType.PAID, + **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!! # This method was auto-generated via `butcher` diff --git a/aiogram/utils/keyboard.py b/aiogram/utils/keyboard.py index 9595700f..23659b8f 100644 --- a/aiogram/utils/keyboard.py +++ b/aiogram/utils/keyboard.py @@ -21,6 +21,7 @@ from typing import ( from aiogram.filters.callback_data import CallbackData from aiogram.types import ( CallbackGame, + CopyTextButton, InlineKeyboardButton, InlineKeyboardMarkup, KeyboardButton, @@ -31,7 +32,6 @@ from aiogram.types import ( ReplyKeyboardMarkup, SwitchInlineQueryChosenChat, WebAppInfo, - CopyTextButton, ) ButtonType = TypeVar("ButtonType", InlineKeyboardButton, KeyboardButton)