mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Update type hints across the codebase (#1749)
* Update type hints across the codebase * Added changelog record
This commit is contained in:
parent
dcff0f99c7
commit
0306695b61
307 changed files with 6190 additions and 6385 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from typing import TYPE_CHECKING, Any, Optional
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from ..types import ChatIdUnion, MessageId
|
||||
from .base import TelegramMethod
|
||||
|
|
@ -20,15 +20,15 @@ class CopyMessages(TelegramMethod[list[MessageId]]):
|
|||
"""Unique identifier for the chat where the original messages were sent (or channel username in the format :code:`@channelusername`)"""
|
||||
message_ids: list[int]
|
||||
"""A JSON-serialized list of 1-100 identifiers of messages in the chat *from_chat_id* to copy. The identifiers must be specified in a strictly increasing order."""
|
||||
message_thread_id: Optional[int] = None
|
||||
message_thread_id: int | None = None
|
||||
"""Unique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only"""
|
||||
direct_messages_topic_id: Optional[int] = None
|
||||
direct_messages_topic_id: int | None = None
|
||||
"""Identifier of the direct messages topic to which the messages will be sent; required if the messages are sent to a direct messages chat"""
|
||||
disable_notification: Optional[bool] = None
|
||||
disable_notification: bool | None = None
|
||||
"""Sends the messages `silently <https://telegram.org/blog/channels-2-0#silent-messages>`_. Users will receive a notification with no sound."""
|
||||
protect_content: Optional[bool] = None
|
||||
protect_content: bool | None = None
|
||||
"""Protects the contents of the sent messages from forwarding and saving"""
|
||||
remove_caption: Optional[bool] = None
|
||||
remove_caption: bool | None = None
|
||||
"""Pass :code:`True` to copy the messages without their captions"""
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -41,11 +41,11 @@ class CopyMessages(TelegramMethod[list[MessageId]]):
|
|||
chat_id: ChatIdUnion,
|
||||
from_chat_id: ChatIdUnion,
|
||||
message_ids: list[int],
|
||||
message_thread_id: Optional[int] = None,
|
||||
direct_messages_topic_id: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
remove_caption: Optional[bool] = None,
|
||||
message_thread_id: int | None = None,
|
||||
direct_messages_topic_id: int | None = None,
|
||||
disable_notification: bool | None = None,
|
||||
protect_content: bool | None = None,
|
||||
remove_caption: bool | None = None,
|
||||
**__pydantic_kwargs: Any,
|
||||
) -> None:
|
||||
# DO NOT EDIT MANUALLY!!!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue