Small fixes

This commit is contained in:
JRoot Junior 2024-11-02 15:57:40 +02:00
parent 05b2678c40
commit 266273e864
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2
5 changed files with 10 additions and 4 deletions

View file

@ -9,3 +9,4 @@ multi_parse:
entities:
- ReactionTypeEmoji
- ReactionTypeCustomEmoji
- ReactionTypePaid

View file

@ -10,3 +10,4 @@ class ReactionTypeType(str, Enum):
EMOJI = "emoji"
CUSTOM_EMOJI = "custom_emoji"
PAID = "paid"

View file

@ -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):

View file

@ -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`

View file

@ -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)