mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Проверка 09.02.2025
This commit is contained in:
@@ -70,6 +70,8 @@ from .log_out import LogOut
|
||||
from .pin_chat_message import PinChatMessage
|
||||
from .promote_chat_member import PromoteChatMember
|
||||
from .refund_star_payment import RefundStarPayment
|
||||
from .remove_chat_verification import RemoveChatVerification
|
||||
from .remove_user_verification import RemoveUserVerification
|
||||
from .reopen_forum_topic import ReopenForumTopic
|
||||
from .reopen_general_forum_topic import ReopenGeneralForumTopic
|
||||
from .replace_sticker_in_set import ReplaceStickerInSet
|
||||
@@ -130,6 +132,8 @@ from .unpin_all_forum_topic_messages import UnpinAllForumTopicMessages
|
||||
from .unpin_all_general_forum_topic_messages import UnpinAllGeneralForumTopicMessages
|
||||
from .unpin_chat_message import UnpinChatMessage
|
||||
from .upload_sticker_file import UploadStickerFile
|
||||
from .verify_chat import VerifyChat
|
||||
from .verify_user import VerifyUser
|
||||
|
||||
__all__ = (
|
||||
"AddStickerToSet",
|
||||
@@ -203,6 +207,8 @@ __all__ = (
|
||||
"PinChatMessage",
|
||||
"PromoteChatMember",
|
||||
"RefundStarPayment",
|
||||
"RemoveChatVerification",
|
||||
"RemoveUserVerification",
|
||||
"ReopenForumTopic",
|
||||
"ReopenGeneralForumTopic",
|
||||
"ReplaceStickerInSet",
|
||||
@@ -266,4 +272,6 @@ __all__ = (
|
||||
"UnpinAllGeneralForumTopicMessages",
|
||||
"UnpinChatMessage",
|
||||
"UploadStickerFile",
|
||||
"VerifyChat",
|
||||
"VerifyUser",
|
||||
)
|
||||
|
@@ -20,6 +20,8 @@ class SendGift(TelegramMethod[bool]):
|
||||
"""Unique identifier of the target user that will receive the gift"""
|
||||
gift_id: str
|
||||
"""Identifier of the gift"""
|
||||
pay_for_upgrade: Optional[bool] = None
|
||||
"""Pass :code:`True` to pay for the gift upgrade from the bot's balance, thereby making the upgrade free for the receiver"""
|
||||
text: Optional[str] = None
|
||||
"""Text that will be shown along with the gift; 0-255 characters"""
|
||||
text_parse_mode: Optional[str] = None
|
||||
@@ -36,6 +38,7 @@ class SendGift(TelegramMethod[bool]):
|
||||
*,
|
||||
user_id: int,
|
||||
gift_id: str,
|
||||
pay_for_upgrade: Optional[bool] = None,
|
||||
text: Optional[str] = None,
|
||||
text_parse_mode: Optional[str] = None,
|
||||
text_entities: Optional[list[MessageEntity]] = None,
|
||||
@@ -48,6 +51,7 @@ class SendGift(TelegramMethod[bool]):
|
||||
super().__init__(
|
||||
user_id=user_id,
|
||||
gift_id=gift_id,
|
||||
pay_for_upgrade=pay_for_upgrade,
|
||||
text=text,
|
||||
text_parse_mode=text_parse_mode,
|
||||
text_entities=text_entities,
|
||||
|
@@ -21,9 +21,9 @@ class SetStickerSetThumbnail(TelegramMethod[bool]):
|
||||
user_id: int
|
||||
"""User identifier of the sticker set owner"""
|
||||
format: str
|
||||
"""Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **WEBM** video"""
|
||||
"""Format of the thumbnail, must be one of 'static' for a **.WEBP** or **.PNG** image, 'animated' for a **.TGS** animation, or 'video' for a **.WEBM** video"""
|
||||
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#animation-requirements <https://core.telegram.org/stickers#animation-requirements>`_`https://core.telegram.org/stickers#animation-requirements <https://core.telegram.org/stickers#animation-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-requirements <https://core.telegram.org/stickers#video-requirements>`_`https://core.telegram.org/stickers#video-requirements <https://core.telegram.org/stickers#video-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#animation-requirements <https://core.telegram.org/stickers#animation-requirements>`_`https://core.telegram.org/stickers#animation-requirements <https://core.telegram.org/stickers#animation-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-requirements <https://core.telegram.org/stickers#video-requirements>`_`https://core.telegram.org/stickers#video-requirements <https://core.telegram.org/stickers#video-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!!!
|
||||
|
@@ -8,7 +8,7 @@ from .base import TelegramMethod
|
||||
|
||||
class SetWebhook(TelegramMethod[bool]):
|
||||
"""
|
||||
Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns :code:`True` on success.
|
||||
Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized :class:`aiogram.types.update.Update`. In case of an unsuccessful request (a request with response `HTTP status code <https://en.wikipedia.org/wiki/List_of_HTTP_status_codes>`_ different from :code:`2XY`), we will repeat the request and give up after a reasonable amount of attempts. Returns :code:`True` on success.
|
||||
If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter *secret_token*. If specified, the request will contain a header 'X-Telegram-Bot-Api-Secret-Token' with the secret token as content.
|
||||
|
||||
**Notes**
|
||||
|
Reference in New Issue
Block a user