Added typehints for init methods of types and methods (#1245)

* Generate init

* Fixed mypy errors

* Bump butcher

* Added changelog
This commit is contained in:
Alex Root Junior 2023-08-04 00:30:27 +03:00 committed by GitHub
parent aea876dfe0
commit 11dc7eaa31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
257 changed files with 7275 additions and 247 deletions

View file

@ -1,195 +1,242 @@
answer: answer:
method: sendMessage method: sendMessage
code: &assert-chat |
assert self.chat is not None, "This method can be used only if chat is present in the message."
fill: &fill-answer fill: &fill-answer
chat_id: self.chat.id chat_id: self.chat.id
message_thread_id: self.message_thread_id if self.is_topic_message else None message_thread_id: self.message_thread_id if self.is_topic_message else None
reply: reply:
method: sendMessage method: sendMessage
code: *assert-chat
fill: &fill-reply fill: &fill-reply
<<: *fill-answer <<: *fill-answer
reply_to_message_id: self.message_id reply_to_message_id: self.message_id
answer_animation: answer_animation:
method: sendAnimation method: sendAnimation
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_animation: reply_animation:
method: sendAnimation method: sendAnimation
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_audio: answer_audio:
method: sendAudio method: sendAudio
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_audio: reply_audio:
method: sendAudio method: sendAudio
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_contact: answer_contact:
method: sendContact method: sendContact
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_contact: reply_contact:
method: sendContact method: sendContact
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_document: answer_document:
method: sendDocument method: sendDocument
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_document: reply_document:
method: sendDocument method: sendDocument
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_game: answer_game:
method: sendGame method: sendGame
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_game: reply_game:
method: sendGame method: sendGame
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_invoice: answer_invoice:
method: sendInvoice method: sendInvoice
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_invoice: reply_invoice:
method: sendInvoice method: sendInvoice
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_location: answer_location:
method: sendLocation method: sendLocation
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_location: reply_location:
method: sendLocation method: sendLocation
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_media_group: answer_media_group:
method: sendMediaGroup method: sendMediaGroup
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_media_group: reply_media_group:
method: sendMediaGroup method: sendMediaGroup
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_photo: answer_photo:
method: sendPhoto method: sendPhoto
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_photo: reply_photo:
method: sendPhoto method: sendPhoto
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_poll: answer_poll:
method: sendPoll method: sendPoll
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_poll: reply_poll:
method: sendPoll method: sendPoll
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_dice: answer_dice:
method: sendDice method: sendDice
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_dice: reply_dice:
method: sendDice method: sendDice
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_sticker: answer_sticker:
method: sendSticker method: sendSticker
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_sticker: reply_sticker:
method: sendSticker method: sendSticker
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_venue: answer_venue:
method: sendVenue method: sendVenue
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_venue: reply_venue:
method: sendVenue method: sendVenue
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_video: answer_video:
method: sendVideo method: sendVideo
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_video: reply_video:
method: sendVideo method: sendVideo
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_video_note: answer_video_note:
method: sendVideoNote method: sendVideoNote
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_video_note: reply_video_note:
method: sendVideoNote method: sendVideoNote
code: *assert-chat
fill: *fill-reply fill: *fill-reply
answer_voice: answer_voice:
method: sendVoice method: sendVoice
code: *assert-chat
fill: *fill-answer fill: *fill-answer
reply_voice: reply_voice:
method: sendVoice method: sendVoice
code: *assert-chat
fill: *fill-reply fill: *fill-reply
copy_to: copy_to:
method: copyMessage method: copyMessage
code: *assert-chat
fill: fill:
from_chat_id: self.chat.id from_chat_id: self.chat.id
message_id: self.message_id message_id: self.message_id
forward: forward:
method: forwardMessage method: forwardMessage
code: *assert-chat
fill: fill:
from_chat_id: self.chat.id from_chat_id: self.chat.id
message_id: self.message_id message_id: self.message_id
edit_text: edit_text:
method: editMessageText method: editMessageText
code: *assert-chat
fill: &message-target fill: &message-target
chat_id: self.chat.id if self.chat else None chat_id: self.chat.id
message_id: self.message_id message_id: self.message_id
edit_media: edit_media:
method: editMessageMedia method: editMessageMedia
fill: *message-target fill: *message-target
code: *assert-chat
edit_reply_markup: edit_reply_markup:
method: editMessageReplyMarkup method: editMessageReplyMarkup
code: *assert-chat
fill: *message-target fill: *message-target
delete_reply_markup: delete_reply_markup:
method: editMessageReplyMarkup method: editMessageReplyMarkup
code: *assert-chat
fill: fill:
<<: *message-target <<: *message-target
reply_markup: None reply_markup: None
edit_live_location: edit_live_location:
method: editMessageLiveLocation method: editMessageLiveLocation
code: *assert-chat
fill: *message-target fill: *message-target
stop_live_location: stop_live_location:
method: stopMessageLiveLocation method: stopMessageLiveLocation
code: *assert-chat
fill: *message-target fill: *message-target
edit_caption: edit_caption:
method: editMessageCaption method: editMessageCaption
code: *assert-chat
fill: *message-target fill: *message-target
delete: delete:
method: deleteMessage method: deleteMessage
code: *assert-chat
fill: *message-target fill: *message-target
pin: pin:
method: pinChatMessage method: pinChatMessage
code: *assert-chat
fill: *message-target fill: *message-target
unpin: unpin:
method: unpinChatMessage method: unpinChatMessage
code: *assert-chat
fill: *message-target fill: *message-target

1
CHANGES/1245.misc.rst Normal file
View file

@ -0,0 +1 @@
Code-generated :code:`__init__` typehints in types and methods to make IDE happy without additional pydantic plugin

View file

@ -1,5 +1,7 @@
from __future__ import annotations from __future__ import annotations
from typing import TYPE_CHECKING, Any
from ..types import InputSticker from ..types import InputSticker
from .base import TelegramMethod from .base import TelegramMethod
@ -20,3 +22,21 @@ class AddStickerToSet(TelegramMethod[bool]):
"""Sticker set name""" """Sticker set name"""
sticker: InputSticker sticker: InputSticker
"""A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.""" """A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
user_id: int,
name: str,
sticker: InputSticker,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(user_id=user_id, name=name, sticker=sticker, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramMethod from .base import TelegramMethod
@ -27,3 +27,30 @@ class AnswerCallbackQuery(TelegramMethod[bool]):
"""URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather <https://t.me/botfather>`_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton <https://core.telegram.org/bots/api#inlinekeyboardbutton>`_ *callback_game* button.""" """URL that will be opened by the user's client. If you have created a :class:`aiogram.types.game.Game` and accepted the conditions via `@BotFather <https://t.me/botfather>`_, specify the URL that opens your game - note that this will only work if the query comes from a `https://core.telegram.org/bots/api#inlinekeyboardbutton <https://core.telegram.org/bots/api#inlinekeyboardbutton>`_ *callback_game* button."""
cache_time: Optional[int] = None cache_time: Optional[int] = None
"""The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.""" """The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
callback_query_id: str,
text: Optional[str] = None,
show_alert: Optional[bool] = None,
url: Optional[str] = None,
cache_time: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
callback_query_id=callback_query_id,
text=text,
show_alert=show_alert,
url=url,
cache_time=cache_time,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from pydantic import Field from pydantic import Field
@ -87,3 +87,59 @@ class AnswerInlineQuery(TelegramMethod[bool]):
.. deprecated:: API:6.7 .. deprecated:: API:6.7
https://core.telegram.org/bots/api-changelog#april-21-2023""" https://core.telegram.org/bots/api-changelog#april-21-2023"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
inline_query_id: str,
results: List[
Union[
InlineQueryResultCachedAudio,
InlineQueryResultCachedDocument,
InlineQueryResultCachedGif,
InlineQueryResultCachedMpeg4Gif,
InlineQueryResultCachedPhoto,
InlineQueryResultCachedSticker,
InlineQueryResultCachedVideo,
InlineQueryResultCachedVoice,
InlineQueryResultArticle,
InlineQueryResultAudio,
InlineQueryResultContact,
InlineQueryResultGame,
InlineQueryResultDocument,
InlineQueryResultGif,
InlineQueryResultLocation,
InlineQueryResultMpeg4Gif,
InlineQueryResultPhoto,
InlineQueryResultVenue,
InlineQueryResultVideo,
InlineQueryResultVoice,
]
],
cache_time: Optional[int] = None,
is_personal: Optional[bool] = None,
next_offset: Optional[str] = None,
button: Optional[InlineQueryResultsButton] = None,
switch_pm_parameter: Optional[str] = None,
switch_pm_text: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
inline_query_id=inline_query_id,
results=results,
cache_time=cache_time,
is_personal=is_personal,
next_offset=next_offset,
button=button,
switch_pm_parameter=switch_pm_parameter,
switch_pm_text=switch_pm_text,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramMethod from .base import TelegramMethod
@ -21,3 +21,26 @@ class AnswerPreCheckoutQuery(TelegramMethod[bool]):
"""Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems.""" """Specify :code:`True` if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use :code:`False` if there are any problems."""
error_message: Optional[str] = None error_message: Optional[str] = None
"""Required if *ok* is :code:`False`. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.""" """Required if *ok* is :code:`False`. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
pre_checkout_query_id: str,
ok: bool,
error_message: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
pre_checkout_query_id=pre_checkout_query_id,
ok=ok,
error_message=error_message,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional from typing import TYPE_CHECKING, Any, List, Optional
from ..types import ShippingOption from ..types import ShippingOption
from .base import TelegramMethod from .base import TelegramMethod
@ -24,3 +24,28 @@ class AnswerShippingQuery(TelegramMethod[bool]):
"""Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options.""" """Required if *ok* is :code:`True`. A JSON-serialized array of available shipping options."""
error_message: Optional[str] = None error_message: Optional[str] = None
"""Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.""" """Required if *ok* is :code:`False`. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
shipping_query_id: str,
ok: bool,
shipping_options: Optional[List[ShippingOption]] = None,
error_message: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
shipping_query_id=shipping_query_id,
ok=ok,
shipping_options=shipping_options,
error_message=error_message,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from ..types import ( from ..types import (
InlineQueryResultArticle, InlineQueryResultArticle,
@ -63,3 +63,41 @@ class AnswerWebAppQuery(TelegramMethod[SentWebAppMessage]):
InlineQueryResultVoice, InlineQueryResultVoice,
] ]
"""A JSON-serialized object describing the message to be sent""" """A JSON-serialized object describing the message to be sent"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
web_app_query_id: str,
result: Union[
InlineQueryResultCachedAudio,
InlineQueryResultCachedDocument,
InlineQueryResultCachedGif,
InlineQueryResultCachedMpeg4Gif,
InlineQueryResultCachedPhoto,
InlineQueryResultCachedSticker,
InlineQueryResultCachedVideo,
InlineQueryResultCachedVoice,
InlineQueryResultArticle,
InlineQueryResultAudio,
InlineQueryResultContact,
InlineQueryResultGame,
InlineQueryResultDocument,
InlineQueryResultGif,
InlineQueryResultLocation,
InlineQueryResultMpeg4Gif,
InlineQueryResultPhoto,
InlineQueryResultVenue,
InlineQueryResultVideo,
InlineQueryResultVoice,
],
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(web_app_query_id=web_app_query_id, result=result, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,16 @@ class ApproveChatJoinRequest(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
user_id: int user_id: int
"""Unique identifier of the target user""" """Unique identifier of the target user"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs)

View file

@ -1,7 +1,7 @@
from __future__ import annotations from __future__ import annotations
import datetime import datetime
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -24,3 +24,28 @@ class BanChatMember(TelegramMethod[bool]):
"""Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.""" """Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only."""
revoke_messages: Optional[bool] = None revoke_messages: Optional[bool] = None
"""Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels.""" """Pass :code:`True` to delete all messages from the chat for the user that is being removed. If :code:`False`, the user will be able to see messages in the group that were sent before the user was removed. Always :code:`True` for supergroups and channels."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
user_id: int,
until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
revoke_messages: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
user_id=user_id,
until_date=until_date,
revoke_messages=revoke_messages,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,20 @@ class BanChatSenderChat(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
sender_chat_id: int sender_chat_id: int
"""Unique identifier of the target sender chat""" """Unique identifier of the target sender chat"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
sender_chat_id: int,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, sender_chat_id=sender_chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,22 @@ class CloseForumTopic(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
message_thread_id: int message_thread_id: int
"""Unique identifier for the target message thread of the forum topic""" """Unique identifier for the target message thread of the forum topic"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
message_thread_id: int,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +17,16 @@ class CloseGeneralForumTopic(TelegramMethod[bool]):
chat_id: Union[int, str] chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
UNSET_PARSE_MODE, UNSET_PARSE_MODE,
@ -51,3 +51,46 @@ class CopyMessage(TelegramMethod[MessageId]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
from_chat_id: Union[int, str],
message_id: int,
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET_PARSE_MODE,
caption_entities: Optional[List[MessageEntity]] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
from_chat_id=from_chat_id,
message_id=message_id,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,7 +1,7 @@
from __future__ import annotations from __future__ import annotations
import datetime import datetime
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ChatInviteLink from ..types import ChatInviteLink
from .base import TelegramMethod from .base import TelegramMethod
@ -27,3 +27,30 @@ class CreateChatInviteLink(TelegramMethod[ChatInviteLink]):
"""The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"""
creates_join_request: Optional[bool] = None creates_join_request: Optional[bool] = None
""":code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified""" """:code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
name: Optional[str] = None,
expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
member_limit: Optional[int] = None,
creates_join_request: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
name=name,
expire_date=expire_date,
member_limit=member_limit,
creates_join_request=creates_join_request,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ForumTopic from ..types import ForumTopic
from .base import TelegramMethod from .base import TelegramMethod
@ -24,3 +24,28 @@ class CreateForumTopic(TelegramMethod[ForumTopic]):
"""Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)""" """Color of the topic icon in RGB format. Currently, must be one of 7322096 (0x6FB9F0), 16766590 (0xFFD67E), 13338331 (0xCB86DB), 9367192 (0x8EEE98), 16749490 (0xFF93B2), or 16478047 (0xFB6F5F)"""
icon_custom_emoji_id: Optional[str] = None icon_custom_emoji_id: Optional[str] = None
"""Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers.""" """Unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
name: str,
icon_color: Optional[int] = None,
icon_custom_emoji_id: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
name=name,
icon_color=icon_color,
icon_custom_emoji_id=icon_custom_emoji_id,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional from typing import TYPE_CHECKING, Any, List, Optional
from ..types import LabeledPrice from ..types import LabeledPrice
from .base import TelegramMethod from .base import TelegramMethod
@ -56,3 +56,60 @@ class CreateInvoiceLink(TelegramMethod[str]):
"""Pass :code:`True` if the user's email address should be sent to the provider""" """Pass :code:`True` if the user's email address should be sent to the provider"""
is_flexible: Optional[bool] = None is_flexible: Optional[bool] = None
"""Pass :code:`True` if the final price depends on the shipping method""" """Pass :code:`True` if the final price depends on the shipping method"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
title: str,
description: str,
payload: str,
provider_token: str,
currency: str,
prices: List[LabeledPrice],
max_tip_amount: Optional[int] = None,
suggested_tip_amounts: Optional[List[int]] = None,
provider_data: Optional[str] = None,
photo_url: Optional[str] = None,
photo_size: Optional[int] = None,
photo_width: Optional[int] = None,
photo_height: Optional[int] = None,
need_name: Optional[bool] = None,
need_phone_number: Optional[bool] = None,
need_email: Optional[bool] = None,
need_shipping_address: Optional[bool] = None,
send_phone_number_to_provider: Optional[bool] = None,
send_email_to_provider: Optional[bool] = None,
is_flexible: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
title=title,
description=description,
payload=payload,
provider_token=provider_token,
currency=currency,
prices=prices,
max_tip_amount=max_tip_amount,
suggested_tip_amounts=suggested_tip_amounts,
provider_data=provider_data,
photo_url=photo_url,
photo_size=photo_size,
photo_width=photo_width,
photo_height=photo_height,
need_name=need_name,
need_phone_number=need_phone_number,
need_email=need_email,
need_shipping_address=need_shipping_address,
send_phone_number_to_provider=send_phone_number_to_provider,
send_email_to_provider=send_email_to_provider,
is_flexible=is_flexible,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional from typing import TYPE_CHECKING, Any, List, Optional
from ..types import InputSticker from ..types import InputSticker
from .base import TelegramMethod from .base import TelegramMethod
@ -30,3 +30,34 @@ class CreateNewStickerSet(TelegramMethod[bool]):
"""Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created.""" """Type of stickers in the set, pass 'regular', 'mask', or 'custom_emoji'. By default, a regular sticker set is created."""
needs_repainting: Optional[bool] = None needs_repainting: Optional[bool] = None
"""Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only""" """Pass :code:`True` if stickers in the sticker set must be repainted to the color of text when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context; for custom emoji sticker sets only"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
user_id: int,
name: str,
title: str,
stickers: List[InputSticker],
sticker_format: str,
sticker_type: Optional[str] = None,
needs_repainting: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
user_id=user_id,
name=name,
title=title,
stickers=stickers,
sticker_format=sticker_format,
sticker_type=sticker_type,
needs_repainting=needs_repainting,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,16 @@ class DeclineChatJoinRequest(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
user_id: int user_id: int
"""Unique identifier of the target user""" """Unique identifier of the target user"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +17,16 @@ class DeleteChatPhoto(TelegramMethod[bool]):
chat_id: Union[int, str] chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +17,16 @@ class DeleteChatStickerSet(TelegramMethod[bool]):
chat_id: Union[int, str] chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,22 @@ class DeleteForumTopic(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
message_thread_id: int message_thread_id: int
"""Unique identifier for the target message thread of the forum topic""" """Unique identifier for the target message thread of the forum topic"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
message_thread_id: int,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -37,3 +37,20 @@ class DeleteMessage(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
message_id: int message_id: int
"""Identifier of the message to delete""" """Identifier of the message to delete"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
message_id: int,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, message_id=message_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ( from ..types import (
BotCommandScopeAllChatAdministrators, BotCommandScopeAllChatAdministrators,
@ -38,3 +38,30 @@ class DeleteMyCommands(TelegramMethod[bool]):
"""A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" """A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`."""
language_code: Optional[str] = None language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands""" """A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
scope: Optional[
Union[
BotCommandScopeDefault,
BotCommandScopeAllPrivateChats,
BotCommandScopeAllGroupChats,
BotCommandScopeAllChatAdministrators,
BotCommandScopeChat,
BotCommandScopeChatAdministrators,
BotCommandScopeChatMember,
]
] = None,
language_code: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(scope=scope, language_code=language_code, **__pydantic_kwargs)

View file

@ -1,5 +1,7 @@
from __future__ import annotations from __future__ import annotations
from typing import TYPE_CHECKING, Any
from .base import TelegramMethod from .base import TelegramMethod
@ -15,3 +17,14 @@ class DeleteStickerFromSet(TelegramMethod[bool]):
sticker: str sticker: str
"""File identifier of the sticker""" """File identifier of the sticker"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(__pydantic__self__, *, sticker: str, **__pydantic_kwargs: Any) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(sticker=sticker, **__pydantic_kwargs)

View file

@ -1,5 +1,7 @@
from __future__ import annotations from __future__ import annotations
from typing import TYPE_CHECKING, Any
from .base import TelegramMethod from .base import TelegramMethod
@ -15,3 +17,14 @@ class DeleteStickerSet(TelegramMethod[bool]):
name: str name: str
"""Sticker set name""" """Sticker set name"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(__pydantic__self__, *, name: str, **__pydantic_kwargs: Any) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(name=name, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +17,19 @@ class DeleteWebhook(TelegramMethod[bool]):
drop_pending_updates: Optional[bool] = None drop_pending_updates: Optional[bool] = None
"""Pass :code:`True` to drop all pending updates""" """Pass :code:`True` to drop all pending updates"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
drop_pending_updates: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(drop_pending_updates=drop_pending_updates, **__pydantic_kwargs)

View file

@ -1,7 +1,7 @@
from __future__ import annotations from __future__ import annotations
import datetime import datetime
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ChatInviteLink from ..types import ChatInviteLink
from .base import TelegramMethod from .base import TelegramMethod
@ -29,3 +29,32 @@ class EditChatInviteLink(TelegramMethod[ChatInviteLink]):
"""The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999""" """The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999"""
creates_join_request: Optional[bool] = None creates_join_request: Optional[bool] = None
""":code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified""" """:code:`True`, if users joining the chat via the link need to be approved by chat administrators. If :code:`True`, *member_limit* can't be specified"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
invite_link: str,
name: Optional[str] = None,
expire_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
member_limit: Optional[int] = None,
creates_join_request: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
invite_link=invite_link,
name=name,
expire_date=expire_date,
member_limit=member_limit,
creates_join_request=creates_join_request,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -23,3 +23,28 @@ class EditForumTopic(TelegramMethod[bool]):
"""New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept""" """New topic name, 0-128 characters. If not specified or empty, the current name of the topic will be kept"""
icon_custom_emoji_id: Optional[str] = None icon_custom_emoji_id: Optional[str] = None
"""New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept""" """New unique identifier of the custom emoji shown as the topic icon. Use :class:`aiogram.methods.get_forum_topic_icon_stickers.GetForumTopicIconStickers` to get all allowed custom emoji identifiers. Pass an empty string to remove the icon. If not specified, the current icon will be kept"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
message_thread_id: int,
name: Optional[str] = None,
icon_custom_emoji_id: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
message_thread_id=message_thread_id,
name=name,
icon_custom_emoji_id=icon_custom_emoji_id,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,16 @@ class EditGeneralForumTopic(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
name: str name: str
"""New topic name, 1-128 characters""" """New topic name, 1-128 characters"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], name: str, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, name=name, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity
from .base import TelegramMethod from .base import TelegramMethod
@ -30,3 +30,34 @@ class EditMessageCaption(TelegramMethod[Union[Message, bool]]):
"""A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*""" """A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse_mode*"""
reply_markup: Optional[InlineKeyboardMarkup] = None reply_markup: Optional[InlineKeyboardMarkup] = None
"""A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_.""" """A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Optional[Union[int, str]] = None,
message_id: Optional[int] = None,
inline_message_id: Optional[str] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET_PARSE_MODE,
caption_entities: Optional[List[MessageEntity]] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
message_id=message_id,
inline_message_id=inline_message_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import InlineKeyboardMarkup, Message from ..types import InlineKeyboardMarkup, Message
from .base import TelegramMethod from .base import TelegramMethod
@ -34,3 +34,38 @@ class EditMessageLiveLocation(TelegramMethod[Union[Message, bool]]):
"""The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.""" """The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified."""
reply_markup: Optional[InlineKeyboardMarkup] = None reply_markup: Optional[InlineKeyboardMarkup] = None
"""A JSON-serialized object for a new `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_.""" """A JSON-serialized object for a new `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
latitude: float,
longitude: float,
chat_id: Optional[Union[int, str]] = None,
message_id: Optional[int] = None,
inline_message_id: Optional[str] = None,
horizontal_accuracy: Optional[float] = None,
heading: Optional[int] = None,
proximity_alert_radius: Optional[int] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
latitude=latitude,
longitude=longitude,
chat_id=chat_id,
message_id=message_id,
inline_message_id=inline_message_id,
horizontal_accuracy=horizontal_accuracy,
heading=heading,
proximity_alert_radius=proximity_alert_radius,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ( from ..types import (
InlineKeyboardMarkup, InlineKeyboardMarkup,
@ -36,3 +36,36 @@ class EditMessageMedia(TelegramMethod[Union[Message, bool]]):
"""Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message"""
reply_markup: Optional[InlineKeyboardMarkup] = None reply_markup: Optional[InlineKeyboardMarkup] = None
"""A JSON-serialized object for a new `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_.""" """A JSON-serialized object for a new `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
media: Union[
InputMediaAnimation,
InputMediaDocument,
InputMediaAudio,
InputMediaPhoto,
InputMediaVideo,
],
chat_id: Optional[Union[int, str]] = None,
message_id: Optional[int] = None,
inline_message_id: Optional[str] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
media=media,
chat_id=chat_id,
message_id=message_id,
inline_message_id=inline_message_id,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import InlineKeyboardMarkup, Message from ..types import InlineKeyboardMarkup, Message
from .base import TelegramMethod from .base import TelegramMethod
@ -24,3 +24,28 @@ class EditMessageReplyMarkup(TelegramMethod[Union[Message, bool]]):
"""Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message"""
reply_markup: Optional[InlineKeyboardMarkup] = None reply_markup: Optional[InlineKeyboardMarkup] = None
"""A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_.""" """A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Optional[Union[int, str]] = None,
message_id: Optional[int] = None,
inline_message_id: Optional[str] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
message_id=message_id,
inline_message_id=inline_message_id,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity from ..types import UNSET_PARSE_MODE, InlineKeyboardMarkup, Message, MessageEntity
from ..types.base import UNSET_DISABLE_WEB_PAGE_PREVIEW from ..types.base import UNSET_DISABLE_WEB_PAGE_PREVIEW
@ -33,3 +33,36 @@ class EditMessageText(TelegramMethod[Union[Message, bool]]):
"""Disables link previews for links in this message""" """Disables link previews for links in this message"""
reply_markup: Optional[InlineKeyboardMarkup] = None reply_markup: Optional[InlineKeyboardMarkup] = None
"""A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_.""" """A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
text: str,
chat_id: Optional[Union[int, str]] = None,
message_id: Optional[int] = None,
inline_message_id: Optional[str] = None,
parse_mode: Optional[str] = UNSET_PARSE_MODE,
entities: Optional[List[MessageEntity]] = None,
disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW,
reply_markup: Optional[InlineKeyboardMarkup] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
text=text,
chat_id=chat_id,
message_id=message_id,
inline_message_id=inline_message_id,
parse_mode=parse_mode,
entities=entities,
disable_web_page_preview=disable_web_page_preview,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,16 @@ class ExportChatInviteLink(TelegramMethod[str]):
chat_id: Union[int, str] chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import Message from ..types import Message
from ..types.base import UNSET_PROTECT_CONTENT from ..types.base import UNSET_PROTECT_CONTENT
@ -29,3 +29,32 @@ class ForwardMessage(TelegramMethod[Message]):
"""Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound.""" """Sends the message `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT protect_content: Optional[bool] = UNSET_PROTECT_CONTENT
"""Protects the contents of the forwarded message from forwarding and saving""" """Protects the contents of the forwarded message from forwarding and saving"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
from_chat_id: Union[int, str],
message_id: int,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
from_chat_id=from_chat_id,
message_id=message_id,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from ..types import Chat from ..types import Chat
from .base import TelegramMethod from .base import TelegramMethod
@ -18,3 +18,16 @@ class GetChat(TelegramMethod[Chat]):
chat_id: Union[int, str] chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Union from typing import TYPE_CHECKING, Any, List, Union
from ..types import ( from ..types import (
ChatMemberAdministrator, ChatMemberAdministrator,
@ -47,3 +47,16 @@ class GetChatAdministrators(
chat_id: Union[int, str] chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from ..types import ( from ..types import (
ChatMemberAdministrator, ChatMemberAdministrator,
@ -45,3 +45,16 @@ class GetChatMember(
"""Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)"""
user_id: int user_id: int
"""Unique identifier of the target user""" """Unique identifier of the target user"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], user_id: int, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, user_id=user_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +17,16 @@ class GetChatMemberCount(TelegramMethod[int]):
chat_id: Union[int, str] chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp
from .base import TelegramMethod from .base import TelegramMethod
@ -20,3 +20,16 @@ class GetChatMenuButton(
chat_id: Optional[int] = None chat_id: Optional[int] = None
"""Unique identifier for the target private chat. If not specified, default bot's menu button will be returned""" """Unique identifier for the target private chat. If not specified, default bot's menu button will be returned"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Optional[int] = None, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List from typing import TYPE_CHECKING, Any, List
from ..types import Sticker from ..types import Sticker
from .base import TelegramMethod from .base import TelegramMethod
@ -18,3 +18,16 @@ class GetCustomEmojiStickers(TelegramMethod[List[Sticker]]):
custom_emoji_ids: List[str] custom_emoji_ids: List[str]
"""List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.""" """List of custom emoji identifiers. At most 200 custom emoji identifiers can be specified."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, custom_emoji_ids: List[str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(custom_emoji_ids=custom_emoji_ids, **__pydantic_kwargs)

View file

@ -1,5 +1,7 @@
from __future__ import annotations from __future__ import annotations
from typing import TYPE_CHECKING, Any
from ..types import File from ..types import File
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +19,14 @@ class GetFile(TelegramMethod[File]):
file_id: str file_id: str
"""File identifier to get information about""" """File identifier to get information about"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(__pydantic__self__, *, file_id: str, **__pydantic_kwargs: Any) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(file_id=file_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional from typing import TYPE_CHECKING, Any, List, Optional
from ..types import GameHighScore from ..types import GameHighScore
from .base import TelegramMethod from .base import TelegramMethod
@ -26,3 +26,28 @@ class GetGameHighScores(TelegramMethod[List[GameHighScore]]):
"""Required if *inline_message_id* is not specified. Identifier of the sent message""" """Required if *inline_message_id* is not specified. Identifier of the sent message"""
inline_message_id: Optional[str] = None inline_message_id: Optional[str] = None
"""Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
user_id: int,
chat_id: Optional[int] = None,
message_id: Optional[int] = None,
inline_message_id: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
user_id=user_id,
chat_id=chat_id,
message_id=message_id,
inline_message_id=inline_message_id,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
BotCommand, BotCommand,
@ -39,3 +39,30 @@ class GetMyCommands(TelegramMethod[List[BotCommand]]):
"""A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" """A JSON-serialized object, describing scope of users. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`."""
language_code: Optional[str] = None language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code or an empty string""" """A two-letter ISO 639-1 language code or an empty string"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
scope: Optional[
Union[
BotCommandScopeDefault,
BotCommandScopeAllPrivateChats,
BotCommandScopeAllGroupChats,
BotCommandScopeAllChatAdministrators,
BotCommandScopeChat,
BotCommandScopeChatAdministrators,
BotCommandScopeChatMember,
]
] = None,
language_code: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(scope=scope, language_code=language_code, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from ..types import ChatAdministratorRights from ..types import ChatAdministratorRights
from .base import TelegramMethod from .base import TelegramMethod
@ -18,3 +18,16 @@ class GetMyDefaultAdministratorRights(TelegramMethod[ChatAdministratorRights]):
for_channels: Optional[bool] = None for_channels: Optional[bool] = None
"""Pass :code:`True` to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.""" """Pass :code:`True` to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, for_channels: Optional[bool] = None, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(for_channels=for_channels, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from ..types import BotDescription from ..types import BotDescription
from .base import TelegramMethod from .base import TelegramMethod
@ -18,3 +18,16 @@ class GetMyDescription(TelegramMethod[BotDescription]):
language_code: Optional[str] = None language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code or an empty string""" """A two-letter ISO 639-1 language code or an empty string"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(language_code=language_code, **__pydantic_kwargs)

View file

@ -1,4 +1,4 @@
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from ..types import BotName from ..types import BotName
from .base import TelegramMethod from .base import TelegramMethod
@ -16,3 +16,16 @@ class GetMyName(TelegramMethod[BotName]):
language_code: Optional[str] = None language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code or an empty string""" """A two-letter ISO 639-1 language code or an empty string"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(language_code=language_code, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from ..types import BotShortDescription from ..types import BotShortDescription
from .base import TelegramMethod from .base import TelegramMethod
@ -18,3 +18,16 @@ class GetMyShortDescription(TelegramMethod[BotShortDescription]):
language_code: Optional[str] = None language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code or an empty string""" """A two-letter ISO 639-1 language code or an empty string"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, language_code: Optional[str] = None, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(language_code=language_code, **__pydantic_kwargs)

View file

@ -1,5 +1,7 @@
from __future__ import annotations from __future__ import annotations
from typing import TYPE_CHECKING, Any
from ..types import StickerSet from ..types import StickerSet
from .base import TelegramMethod from .base import TelegramMethod
@ -16,3 +18,14 @@ class GetStickerSet(TelegramMethod[StickerSet]):
name: str name: str
"""Name of the sticker set""" """Name of the sticker set"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(__pydantic__self__, *, name: str, **__pydantic_kwargs: Any) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(name=name, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional from typing import TYPE_CHECKING, Any, List, Optional
from ..types import Update from ..types import Update
from .base import TelegramMethod from .base import TelegramMethod
@ -30,3 +30,28 @@ class GetUpdates(TelegramMethod[List[Update]]):
"""Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.""" """Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only."""
allowed_updates: Optional[List[str]] = None allowed_updates: Optional[List[str]] = None
"""A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used.""" """A JSON-serialized list of the update types you want your bot to receive. For example, specify ['message', 'edited_channel_post', 'callback_query'] to only receive updates of these types. See :class:`aiogram.types.update.Update` for a complete list of available update types. Specify an empty list to receive all update types except *chat_member* (default). If not specified, the previous setting will be used."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
offset: Optional[int] = None,
limit: Optional[int] = None,
timeout: Optional[int] = None,
allowed_updates: Optional[List[str]] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
offset=offset,
limit=limit,
timeout=timeout,
allowed_updates=allowed_updates,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from ..types import UserProfilePhotos from ..types import UserProfilePhotos
from .base import TelegramMethod from .base import TelegramMethod
@ -22,3 +22,21 @@ class GetUserProfilePhotos(TelegramMethod[UserProfilePhotos]):
"""Sequential number of the first photo to be returned. By default, all photos are returned.""" """Sequential number of the first photo to be returned. By default, all photos are returned."""
limit: Optional[int] = None limit: Optional[int] = None
"""Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.""" """Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
user_id: int,
offset: Optional[int] = None,
limit: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(user_id=user_id, offset=offset, limit=limit, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +17,16 @@ class HideGeneralForumTopic(TelegramMethod[bool]):
chat_id: Union[int, str] chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +17,16 @@ class LeaveChat(TelegramMethod[bool]):
chat_id: Union[int, str] chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target supergroup or channel (in the format :code:`@channelusername`)"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -21,3 +21,26 @@ class PinChatMessage(TelegramMethod[bool]):
"""Identifier of a message to pin""" """Identifier of a message to pin"""
disable_notification: Optional[bool] = None disable_notification: Optional[bool] = None
"""Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats.""" """Pass :code:`True` if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
message_id: int,
disable_notification: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
message_id=message_id,
disable_notification=disable_notification,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -43,3 +43,48 @@ class PromoteChatMember(TelegramMethod[bool]):
"""Pass :code:`True` if the administrator can pin messages, supergroups only""" """Pass :code:`True` if the administrator can pin messages, supergroups only"""
can_manage_topics: Optional[bool] = None can_manage_topics: Optional[bool] = None
"""Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only""" """Pass :code:`True` if the user is allowed to create, rename, close, and reopen forum topics, supergroups only"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
user_id: int,
is_anonymous: Optional[bool] = None,
can_manage_chat: Optional[bool] = None,
can_post_messages: Optional[bool] = None,
can_edit_messages: Optional[bool] = None,
can_delete_messages: Optional[bool] = None,
can_manage_video_chats: Optional[bool] = None,
can_restrict_members: Optional[bool] = None,
can_promote_members: Optional[bool] = None,
can_change_info: Optional[bool] = None,
can_invite_users: Optional[bool] = None,
can_pin_messages: Optional[bool] = None,
can_manage_topics: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
user_id=user_id,
is_anonymous=is_anonymous,
can_manage_chat=can_manage_chat,
can_post_messages=can_post_messages,
can_edit_messages=can_edit_messages,
can_delete_messages=can_delete_messages,
can_manage_video_chats=can_manage_video_chats,
can_restrict_members=can_restrict_members,
can_promote_members=can_promote_members,
can_change_info=can_change_info,
can_invite_users=can_invite_users,
can_pin_messages=can_pin_messages,
can_manage_topics=can_manage_topics,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,22 @@ class ReopenForumTopic(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
message_thread_id: int message_thread_id: int
"""Unique identifier for the target message thread of the forum topic""" """Unique identifier for the target message thread of the forum topic"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
message_thread_id: int,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id, message_thread_id=message_thread_id, **__pydantic_kwargs
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +17,16 @@ class ReopenGeneralForumTopic(TelegramMethod[bool]):
chat_id: Union[int, str] chat_id: Union[int, str]
"""Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, **__pydantic_kwargs)

View file

@ -1,7 +1,7 @@
from __future__ import annotations from __future__ import annotations
import datetime import datetime
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ChatPermissions from ..types import ChatPermissions
from .base import TelegramMethod from .base import TelegramMethod
@ -27,3 +27,30 @@ class RestrictChatMember(TelegramMethod[bool]):
"""Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission."""
until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None
"""Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever""" """Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
user_id: int,
permissions: ChatPermissions,
use_independent_chat_permissions: Optional[bool] = None,
until_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
user_id=user_id,
permissions=permissions,
use_independent_chat_permissions=use_independent_chat_permissions,
until_date=until_date,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from ..types import ChatInviteLink from ..types import ChatInviteLink
from .base import TelegramMethod from .base import TelegramMethod
@ -20,3 +20,20 @@ class RevokeChatInviteLink(TelegramMethod[ChatInviteLink]):
"""Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`)""" """Unique identifier of the target chat or username of the target channel (in the format :code:`@channelusername`)"""
invite_link: str invite_link: str
"""The invite link to revoke""" """The invite link to revoke"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
invite_link: str,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, invite_link=invite_link, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
UNSET_PARSE_MODE, UNSET_PARSE_MODE,
@ -60,3 +60,54 @@ class SendAnimation(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
animation: Union[InputFile, str],
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET_PARSE_MODE,
caption_entities: Optional[List[MessageEntity]] = None,
has_spoiler: Optional[bool] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
animation=animation,
message_thread_id=message_thread_id,
duration=duration,
width=width,
height=height,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
has_spoiler=has_spoiler,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
UNSET_PARSE_MODE, UNSET_PARSE_MODE,
@ -59,3 +59,52 @@ class SendAudio(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
audio: Union[InputFile, str],
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET_PARSE_MODE,
caption_entities: Optional[List[MessageEntity]] = None,
duration: Optional[int] = None,
performer: Optional[str] = None,
title: Optional[str] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
audio=audio,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
duration=duration,
performer=performer,
title=title,
thumbnail=thumbnail,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -25,3 +25,26 @@ class SendChatAction(TelegramMethod[bool]):
"""Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages <https://core.telegram.org/bots/api#sendmessage>`_, *upload_photo* for `photos <https://core.telegram.org/bots/api#sendphoto>`_, *record_video* or *upload_video* for `videos <https://core.telegram.org/bots/api#sendvideo>`_, *record_voice* or *upload_voice* for `voice notes <https://core.telegram.org/bots/api#sendvoice>`_, *upload_document* for `general files <https://core.telegram.org/bots/api#senddocument>`_, *choose_sticker* for `stickers <https://core.telegram.org/bots/api#sendsticker>`_, *find_location* for `location data <https://core.telegram.org/bots/api#sendlocation>`_, *record_video_note* or *upload_video_note* for `video notes <https://core.telegram.org/bots/api#sendvideonote>`_.""" """Type of action to broadcast. Choose one, depending on what the user is about to receive: *typing* for `text messages <https://core.telegram.org/bots/api#sendmessage>`_, *upload_photo* for `photos <https://core.telegram.org/bots/api#sendphoto>`_, *record_video* or *upload_video* for `videos <https://core.telegram.org/bots/api#sendvideo>`_, *record_voice* or *upload_voice* for `voice notes <https://core.telegram.org/bots/api#sendvoice>`_, *upload_document* for `general files <https://core.telegram.org/bots/api#senddocument>`_, *choose_sticker* for `stickers <https://core.telegram.org/bots/api#sendsticker>`_, *find_location* for `location data <https://core.telegram.org/bots/api#sendlocation>`_, *record_video_note* or *upload_video_note* for `video notes <https://core.telegram.org/bots/api#sendvideonote>`_."""
message_thread_id: Optional[int] = None message_thread_id: Optional[int] = None
"""Unique identifier for the target message thread; supergroups only""" """Unique identifier for the target message thread; supergroups only"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
action: str,
message_thread_id: Optional[int] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
action=action,
message_thread_id=message_thread_id,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ( from ..types import (
ForceReply, ForceReply,
@ -47,3 +47,44 @@ class SendContact(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
phone_number: str,
first_name: str,
message_thread_id: Optional[int] = None,
last_name: Optional[str] = None,
vcard: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
phone_number=phone_number,
first_name=first_name,
message_thread_id=message_thread_id,
last_name=last_name,
vcard=vcard,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ( from ..types import (
ForceReply, ForceReply,
@ -41,3 +41,38 @@ class SendDice(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
UNSET_PARSE_MODE, UNSET_PARSE_MODE,
@ -54,3 +54,48 @@ class SendDocument(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
document: Union[InputFile, str],
message_thread_id: Optional[int] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET_PARSE_MODE,
caption_entities: Optional[List[MessageEntity]] = None,
disable_content_type_detection: Optional[bool] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
document=document,
message_thread_id=message_thread_id,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
disable_content_type_detection=disable_content_type_detection,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from ..types import InlineKeyboardMarkup, Message from ..types import InlineKeyboardMarkup, Message
from ..types.base import UNSET_PROTECT_CONTENT from ..types.base import UNSET_PROTECT_CONTENT
@ -33,3 +33,36 @@ class SendGame(TelegramMethod[Message]):
"""Pass :code:`True` if the message should be sent even if the specified replied-to message is not found""" """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found"""
reply_markup: Optional[InlineKeyboardMarkup] = None reply_markup: Optional[InlineKeyboardMarkup] = None
"""A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game.""" """A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Play game_title' button will be shown. If not empty, the first button must launch the game."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: int,
game_short_name: str,
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
game_short_name=game_short_name,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import InlineKeyboardMarkup, LabeledPrice, Message from ..types import InlineKeyboardMarkup, LabeledPrice, Message
from ..types.base import UNSET_PROTECT_CONTENT from ..types.base import UNSET_PROTECT_CONTENT
@ -73,3 +73,76 @@ class SendInvoice(TelegramMethod[Message]):
"""Pass :code:`True` if the message should be sent even if the specified replied-to message is not found""" """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found"""
reply_markup: Optional[InlineKeyboardMarkup] = None reply_markup: Optional[InlineKeyboardMarkup] = None
"""A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button.""" """A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_. If empty, one 'Pay :code:`total price`' button will be shown. If not empty, the first button must be a Pay button."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
title: str,
description: str,
payload: str,
provider_token: str,
currency: str,
prices: List[LabeledPrice],
message_thread_id: Optional[int] = None,
max_tip_amount: Optional[int] = None,
suggested_tip_amounts: Optional[List[int]] = None,
start_parameter: Optional[str] = None,
provider_data: Optional[str] = None,
photo_url: Optional[str] = None,
photo_size: Optional[int] = None,
photo_width: Optional[int] = None,
photo_height: Optional[int] = None,
need_name: Optional[bool] = None,
need_phone_number: Optional[bool] = None,
need_email: Optional[bool] = None,
need_shipping_address: Optional[bool] = None,
send_phone_number_to_provider: Optional[bool] = None,
send_email_to_provider: Optional[bool] = None,
is_flexible: Optional[bool] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[InlineKeyboardMarkup] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
title=title,
description=description,
payload=payload,
provider_token=provider_token,
currency=currency,
prices=prices,
message_thread_id=message_thread_id,
max_tip_amount=max_tip_amount,
suggested_tip_amounts=suggested_tip_amounts,
start_parameter=start_parameter,
provider_data=provider_data,
photo_url=photo_url,
photo_size=photo_size,
photo_width=photo_width,
photo_height=photo_height,
need_name=need_name,
need_phone_number=need_phone_number,
need_email=need_email,
need_shipping_address=need_shipping_address,
send_phone_number_to_provider=send_phone_number_to_provider,
send_email_to_provider=send_email_to_provider,
is_flexible=is_flexible,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ( from ..types import (
ForceReply, ForceReply,
@ -51,3 +51,48 @@ class SendLocation(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
latitude: float,
longitude: float,
message_thread_id: Optional[int] = None,
horizontal_accuracy: Optional[float] = None,
live_period: Optional[int] = None,
heading: Optional[int] = None,
proximity_alert_radius: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
latitude=latitude,
longitude=longitude,
message_thread_id=message_thread_id,
horizontal_accuracy=horizontal_accuracy,
live_period=live_period,
heading=heading,
proximity_alert_radius=proximity_alert_radius,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
InputMediaAudio, InputMediaAudio,
@ -37,3 +37,36 @@ class SendMediaGroup(TelegramMethod[List[Message]]):
"""If the messages are a reply, ID of the original message""" """If the messages are a reply, ID of the original message"""
allow_sending_without_reply: Optional[bool] = None allow_sending_without_reply: Optional[bool] = None
"""Pass :code:`True` if the message should be sent even if the specified replied-to message is not found""" """Pass :code:`True` if the message should be sent even if the specified replied-to message is not found"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
media: List[
Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]
],
message_thread_id: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
media=media,
message_thread_id=message_thread_id,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
UNSET_PARSE_MODE, UNSET_PARSE_MODE,
@ -49,3 +49,44 @@ class SendMessage(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
text: str,
message_thread_id: Optional[int] = None,
parse_mode: Optional[str] = UNSET_PARSE_MODE,
entities: Optional[List[MessageEntity]] = None,
disable_web_page_preview: Optional[bool] = UNSET_DISABLE_WEB_PAGE_PREVIEW,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
text=text,
message_thread_id=message_thread_id,
parse_mode=parse_mode,
entities=entities,
disable_web_page_preview=disable_web_page_preview,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
UNSET_PARSE_MODE, UNSET_PARSE_MODE,
@ -52,3 +52,46 @@ class SendPhoto(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
photo: Union[InputFile, str],
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET_PARSE_MODE,
caption_entities: Optional[List[MessageEntity]] = None,
has_spoiler: Optional[bool] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
photo=photo,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
has_spoiler=has_spoiler,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,7 +1,7 @@
from __future__ import annotations from __future__ import annotations
import datetime import datetime
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
UNSET_PARSE_MODE, UNSET_PARSE_MODE,
@ -66,3 +66,60 @@ class SendPoll(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
question: str,
options: List[str],
message_thread_id: Optional[int] = None,
is_anonymous: Optional[bool] = None,
type: Optional[str] = None,
allows_multiple_answers: Optional[bool] = None,
correct_option_id: Optional[int] = None,
explanation: Optional[str] = None,
explanation_parse_mode: Optional[str] = UNSET_PARSE_MODE,
explanation_entities: Optional[List[MessageEntity]] = None,
open_period: Optional[int] = None,
close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
is_closed: Optional[bool] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
question=question,
options=options,
message_thread_id=message_thread_id,
is_anonymous=is_anonymous,
type=type,
allows_multiple_answers=allows_multiple_answers,
correct_option_id=correct_option_id,
explanation=explanation,
explanation_parse_mode=explanation_parse_mode,
explanation_entities=explanation_entities,
open_period=open_period,
close_date=close_date,
is_closed=is_closed,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ( from ..types import (
ForceReply, ForceReply,
@ -44,3 +44,40 @@ class SendSticker(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
sticker: Union[InputFile, str],
message_thread_id: Optional[int] = None,
emoji: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
sticker=sticker,
message_thread_id=message_thread_id,
emoji=emoji,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ( from ..types import (
ForceReply, ForceReply,
@ -55,3 +55,52 @@ class SendVenue(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
latitude: float,
longitude: float,
title: str,
address: str,
message_thread_id: Optional[int] = None,
foursquare_id: Optional[str] = None,
foursquare_type: Optional[str] = None,
google_place_id: Optional[str] = None,
google_place_type: Optional[str] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
latitude=latitude,
longitude=longitude,
title=title,
address=address,
message_thread_id=message_thread_id,
foursquare_id=foursquare_id,
foursquare_type=foursquare_type,
google_place_id=google_place_id,
google_place_type=google_place_type,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
UNSET_PARSE_MODE, UNSET_PARSE_MODE,
@ -62,3 +62,56 @@ class SendVideo(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
video: Union[InputFile, str],
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
width: Optional[int] = None,
height: Optional[int] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET_PARSE_MODE,
caption_entities: Optional[List[MessageEntity]] = None,
has_spoiler: Optional[bool] = None,
supports_streaming: Optional[bool] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
video=video,
message_thread_id=message_thread_id,
duration=duration,
width=width,
height=height,
thumbnail=thumbnail,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
has_spoiler=has_spoiler,
supports_streaming=supports_streaming,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ( from ..types import (
ForceReply, ForceReply,
@ -48,3 +48,44 @@ class SendVideoNote(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
video_note: Union[InputFile, str],
message_thread_id: Optional[int] = None,
duration: Optional[int] = None,
length: Optional[int] = None,
thumbnail: Optional[Union[InputFile, str]] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
video_note=video_note,
message_thread_id=message_thread_id,
duration=duration,
length=length,
thumbnail=thumbnail,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
UNSET_PARSE_MODE, UNSET_PARSE_MODE,
@ -52,3 +52,46 @@ class SendVoice(TelegramMethod[Message]):
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply] Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None ] = None
"""Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user.""" """Additional interface options. A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_, `custom reply keyboard <https://core.telegram.org/bots/features#keyboards>`_, instructions to remove reply keyboard or to force a reply from the user."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
voice: Union[InputFile, str],
message_thread_id: Optional[int] = None,
caption: Optional[str] = None,
parse_mode: Optional[str] = UNSET_PARSE_MODE,
caption_entities: Optional[List[MessageEntity]] = None,
duration: Optional[int] = None,
disable_notification: Optional[bool] = None,
protect_content: Optional[bool] = UNSET_PROTECT_CONTENT,
reply_to_message_id: Optional[int] = None,
allow_sending_without_reply: Optional[bool] = None,
reply_markup: Optional[
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
voice=voice,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
duration=duration,
disable_notification=disable_notification,
protect_content=protect_content,
reply_to_message_id=reply_to_message_id,
allow_sending_without_reply=allow_sending_without_reply,
reply_markup=reply_markup,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -21,3 +21,23 @@ class SetChatAdministratorCustomTitle(TelegramMethod[bool]):
"""Unique identifier of the target user""" """Unique identifier of the target user"""
custom_title: str custom_title: str
"""New custom title for the administrator; 0-16 characters, emoji are not allowed""" """New custom title for the administrator; 0-16 characters, emoji are not allowed"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
user_id: int,
custom_title: str,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id, user_id=user_id, custom_title=custom_title, **__pydantic_kwargs
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,20 @@ class SetChatDescription(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
description: Optional[str] = None description: Optional[str] = None
"""New chat description, 0-255 characters""" """New chat description, 0-255 characters"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
description: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, description=description, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp from ..types import MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp
from .base import TelegramMethod from .base import TelegramMethod
@ -20,3 +20,22 @@ class SetChatMenuButton(TelegramMethod[bool]):
"""Unique identifier for the target private chat. If not specified, default bot's menu button will be changed""" """Unique identifier for the target private chat. If not specified, default bot's menu button will be changed"""
menu_button: Optional[Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault]] = None menu_button: Optional[Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault]] = None
"""A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`""" """A JSON-serialized object for the bot's new menu button. Defaults to :class:`aiogram.types.menu_button_default.MenuButtonDefault`"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Optional[int] = None,
menu_button: Optional[
Union[MenuButtonCommands, MenuButtonWebApp, MenuButtonDefault]
] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, menu_button=menu_button, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import ChatPermissions from ..types import ChatPermissions
from .base import TelegramMethod from .base import TelegramMethod
@ -22,3 +22,26 @@ class SetChatPermissions(TelegramMethod[bool]):
"""A JSON-serialized object for new default chat permissions""" """A JSON-serialized object for new default chat permissions"""
use_independent_chat_permissions: Optional[bool] = None use_independent_chat_permissions: Optional[bool] = None
"""Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission.""" """Pass :code:`True` if chat permissions are set independently. Otherwise, the *can_send_other_messages* and *can_add_web_page_previews* permissions will imply the *can_send_messages*, *can_send_audios*, *can_send_documents*, *can_send_photos*, *can_send_videos*, *can_send_video_notes*, and *can_send_voice_notes* permissions; the *can_send_polls* permission will imply the *can_send_messages* permission."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
permissions: ChatPermissions,
use_independent_chat_permissions: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id,
permissions=permissions,
use_independent_chat_permissions=use_independent_chat_permissions,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from ..types import InputFile from ..types import InputFile
from .base import TelegramMethod from .base import TelegramMethod
@ -20,3 +20,20 @@ class SetChatPhoto(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
photo: InputFile photo: InputFile
"""New chat photo, uploaded using multipart/form-data""" """New chat photo, uploaded using multipart/form-data"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
photo: InputFile,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, photo=photo, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,22 @@ class SetChatStickerSet(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)""" """Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)"""
sticker_set_name: str sticker_set_name: str
"""Name of the sticker set to be set as the group sticker set""" """Name of the sticker set to be set as the group sticker set"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
chat_id: Union[int, str],
sticker_set_name: str,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
chat_id=chat_id, sticker_set_name=sticker_set_name, **__pydantic_kwargs
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Union from typing import TYPE_CHECKING, Any, Union
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,16 @@ class SetChatTitle(TelegramMethod[bool]):
"""Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)"""
title: str title: str
"""New chat title, 1-128 characters""" """New chat title, 1-128 characters"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, chat_id: Union[int, str], title: str, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(chat_id=chat_id, title=title, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,20 @@ class SetCustomEmojiStickerSetThumbnail(TelegramMethod[bool]):
"""Sticker set name""" """Sticker set name"""
custom_emoji_id: Optional[str] = None custom_emoji_id: Optional[str] = None
"""Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail.""" """Custom emoji identifier of a sticker from the sticker set; pass an empty string to drop the thumbnail and use the first sticker as the thumbnail."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
name: str,
custom_emoji_id: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(name=name, custom_emoji_id=custom_emoji_id, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import Message from ..types import Message
from .base import TelegramMethod from .base import TelegramMethod
@ -30,3 +30,34 @@ class SetGameScore(TelegramMethod[Union[Message, bool]]):
"""Required if *inline_message_id* is not specified. Identifier of the sent message""" """Required if *inline_message_id* is not specified. Identifier of the sent message"""
inline_message_id: Optional[str] = None inline_message_id: Optional[str] = None
"""Required if *chat_id* and *message_id* are not specified. Identifier of the inline message""" """Required if *chat_id* and *message_id* are not specified. Identifier of the inline message"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
user_id: int,
score: int,
force: Optional[bool] = None,
disable_edit_message: Optional[bool] = None,
chat_id: Optional[int] = None,
message_id: Optional[int] = None,
inline_message_id: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
user_id=user_id,
score=score,
force=force,
disable_edit_message=disable_edit_message,
chat_id=chat_id,
message_id=message_id,
inline_message_id=inline_message_id,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional, Union from typing import TYPE_CHECKING, Any, List, Optional, Union
from ..types import ( from ..types import (
BotCommand, BotCommand,
@ -41,3 +41,33 @@ class SetMyCommands(TelegramMethod[bool]):
"""A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`.""" """A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to :class:`aiogram.types.bot_command_scope_default.BotCommandScopeDefault`."""
language_code: Optional[str] = None language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands""" """A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
commands: List[BotCommand],
scope: Optional[
Union[
BotCommandScopeDefault,
BotCommandScopeAllPrivateChats,
BotCommandScopeAllGroupChats,
BotCommandScopeAllChatAdministrators,
BotCommandScopeChat,
BotCommandScopeChatAdministrators,
BotCommandScopeChatMember,
]
] = None,
language_code: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
commands=commands, scope=scope, language_code=language_code, **__pydantic_kwargs
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from ..types import ChatAdministratorRights from ..types import ChatAdministratorRights
from .base import TelegramMethod from .base import TelegramMethod
@ -20,3 +20,20 @@ class SetMyDefaultAdministratorRights(TelegramMethod[bool]):
"""A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared.""" """A JSON-serialized object describing new default administrator rights. If not specified, the default administrator rights will be cleared."""
for_channels: Optional[bool] = None for_channels: Optional[bool] = None
"""Pass :code:`True` to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.""" """Pass :code:`True` to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
rights: Optional[ChatAdministratorRights] = None,
for_channels: Optional[bool] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(rights=rights, for_channels=for_channels, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,22 @@ class SetMyDescription(TelegramMethod[bool]):
"""New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language.""" """New bot description; 0-512 characters. Pass an empty string to remove the dedicated description for the given language."""
language_code: Optional[str] = None language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description.""" """A two-letter ISO 639-1 language code. If empty, the description will be applied to all users for whose language there is no dedicated description."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
description: Optional[str] = None,
language_code: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
description=description, language_code=language_code, **__pydantic_kwargs
)

View file

@ -1,4 +1,4 @@
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +17,20 @@ class SetMyName(TelegramMethod[bool]):
"""New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language.""" """New bot name; 0-64 characters. Pass an empty string to remove the dedicated name for the given language."""
language_code: Optional[str] = None language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose language there is no dedicated name.""" """A two-letter ISO 639-1 language code. If empty, the name will be shown to all users for whose language there is no dedicated name."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
name: Optional[str] = None,
language_code: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(name=name, language_code=language_code, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,24 @@ class SetMyShortDescription(TelegramMethod[bool]):
"""New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language.""" """New short description for the bot; 0-120 characters. Pass an empty string to remove the dedicated short description for the given language."""
language_code: Optional[str] = None language_code: Optional[str] = None
"""A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description.""" """A two-letter ISO 639-1 language code. If empty, the short description will be applied to all users for whose language there is no dedicated short description."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
short_description: Optional[str] = None,
language_code: Optional[str] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(
short_description=short_description,
language_code=language_code,
**__pydantic_kwargs,
)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Union from typing import TYPE_CHECKING, Any, List, Union
from ..types import ( from ..types import (
PassportElementErrorDataField, PassportElementErrorDataField,
@ -43,3 +43,32 @@ class SetPassportDataErrors(TelegramMethod[bool]):
] ]
] ]
"""A JSON-serialized array describing the errors""" """A JSON-serialized array describing the errors"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
user_id: int,
errors: List[
Union[
PassportElementErrorDataField,
PassportElementErrorFrontSide,
PassportElementErrorReverseSide,
PassportElementErrorSelfie,
PassportElementErrorFile,
PassportElementErrorFiles,
PassportElementErrorTranslationFile,
PassportElementErrorTranslationFiles,
PassportElementErrorUnspecified,
]
],
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(user_id=user_id, errors=errors, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List from typing import TYPE_CHECKING, Any, List
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,16 @@ class SetStickerEmojiList(TelegramMethod[bool]):
"""File identifier of the sticker""" """File identifier of the sticker"""
emoji_list: List[str] emoji_list: List[str]
"""A JSON-serialized list of 1-20 emoji associated with the sticker""" """A JSON-serialized list of 1-20 emoji associated with the sticker"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, sticker: str, emoji_list: List[str], **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(sticker=sticker, emoji_list=emoji_list, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import List, Optional from typing import TYPE_CHECKING, Any, List, Optional
from .base import TelegramMethod from .base import TelegramMethod
@ -19,3 +19,20 @@ class SetStickerKeywords(TelegramMethod[bool]):
"""File identifier of the sticker""" """File identifier of the sticker"""
keywords: Optional[List[str]] = None keywords: Optional[List[str]] = None
"""A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters""" """A JSON-serialized list of 0-20 search keywords for the sticker with total length of up to 64 characters"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
sticker: str,
keywords: Optional[List[str]] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(sticker=sticker, keywords=keywords, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional from typing import TYPE_CHECKING, Any, Optional
from ..types import MaskPosition from ..types import MaskPosition
from .base import TelegramMethod from .base import TelegramMethod
@ -20,3 +20,20 @@ class SetStickerMaskPosition(TelegramMethod[bool]):
"""File identifier of the sticker""" """File identifier of the sticker"""
mask_position: Optional[MaskPosition] = None mask_position: Optional[MaskPosition] = None
"""A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.""" """A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
sticker: str,
mask_position: Optional[MaskPosition] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(sticker=sticker, mask_position=mask_position, **__pydantic_kwargs)

View file

@ -1,5 +1,7 @@
from __future__ import annotations from __future__ import annotations
from typing import TYPE_CHECKING, Any
from .base import TelegramMethod from .base import TelegramMethod
@ -17,3 +19,16 @@ class SetStickerPositionInSet(TelegramMethod[bool]):
"""File identifier of the sticker""" """File identifier of the sticker"""
position: int position: int
"""New sticker position in the set, zero-based""" """New sticker position in the set, zero-based"""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__, *, sticker: str, position: int, **__pydantic_kwargs: Any
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(sticker=sticker, position=position, **__pydantic_kwargs)

View file

@ -1,6 +1,6 @@
from __future__ import annotations from __future__ import annotations
from typing import Optional, Union from typing import TYPE_CHECKING, Any, Optional, Union
from ..types import InputFile from ..types import InputFile
from .base import TelegramMethod from .base import TelegramMethod
@ -22,3 +22,21 @@ class SetStickerSetThumbnail(TelegramMethod[bool]):
"""User identifier of the sticker set owner""" """User identifier of the sticker set owner"""
thumbnail: Optional[Union[InputFile, str]] = None thumbnail: Optional[Union[InputFile, str]] = None
"""A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_`https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_`https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail.""" """A **.WEBP** or **.PNG** image with the thumbnail, must be up to 128 kilobytes in size and have a width and height of exactly 100px, or a **.TGS** animation with a thumbnail up to 32 kilobytes in size (see `https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_`https://core.telegram.org/stickers#animated-sticker-requirements <https://core.telegram.org/stickers#animated-sticker-requirements>`_ for animated sticker technical requirements), or a **WEBM** video with the thumbnail up to 32 kilobytes in size; see `https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_`https://core.telegram.org/stickers#video-sticker-requirements <https://core.telegram.org/stickers#video-sticker-requirements>`_ for video sticker technical requirements. Pass a *file_id* as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. :ref:`More information on Sending Files » <sending-files>`. Animated and video sticker set thumbnails can't be uploaded via HTTP URL. If omitted, then the thumbnail is dropped and the first sticker is used as the thumbnail."""
if TYPE_CHECKING:
# DO NOT EDIT MANUALLY!!!
# This section was auto-generated via `butcher`
def __init__(
__pydantic__self__,
*,
name: str,
user_id: int,
thumbnail: Optional[Union[InputFile, str]] = None,
**__pydantic_kwargs: Any,
) -> None:
# DO NOT EDIT MANUALLY!!!
# This method was auto-generated via `butcher`
# Is needed only for type checking and IDE support without any additional plugins
super().__init__(name=name, user_id=user_id, thumbnail=thumbnail, **__pydantic_kwargs)

Some files were not shown because too many files have changed in this diff Show more