From d394af83bdebe094c440a96c0dc5126632b06aaa Mon Sep 17 00:00:00 2001 From: JRoot Junior Date: Sun, 31 Dec 2023 11:51:00 +0200 Subject: [PATCH] Update docs --- .butcher/methods/setMessageReaction/entity.json | 12 ++++++------ .butcher/schema/schema.json | 12 ++++++------ aiogram/client/bot.py | 4 ++-- aiogram/methods/set_message_reaction.py | 4 ++-- aiogram/types/message.py | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.butcher/methods/setMessageReaction/entity.json b/.butcher/methods/setMessageReaction/entity.json index 11b934bd..3eb079a3 100644 --- a/.butcher/methods/setMessageReaction/entity.json +++ b/.butcher/methods/setMessageReaction/entity.json @@ -7,9 +7,9 @@ "object": { "anchor": "setmessagereaction", "name": "setMessageReaction", - "description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns True on success.", - "html_description": "

Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns True on success.

", - "rst_description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns :code:`True` on success.", + "description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.", + "html_description": "

Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.

", + "rst_description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", @@ -22,9 +22,9 @@ { "type": "Integer", "required": true, - "description": "Identifier of the target message", - "html_description": "Identifier of the target message", - "rst_description": "Identifier of the target message\n", + "description": "Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.", + "html_description": "Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.", + "rst_description": "Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.\n", "name": "message_id" }, { diff --git a/.butcher/schema/schema.json b/.butcher/schema/schema.json index 9b9b33b8..300f56aa 100644 --- a/.butcher/schema/schema.json +++ b/.butcher/schema/schema.json @@ -8123,9 +8123,9 @@ { "anchor": "setmessagereaction", "name": "setMessageReaction", - "description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns True on success.", - "html_description": "

Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns True on success.

", - "rst_description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns :code:`True` on success.", + "description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.", + "html_description": "

Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success.

", + "rst_description": "Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success.", "annotations": [ { "type": "Integer or String", @@ -8138,9 +8138,9 @@ { "type": "Integer", "required": true, - "description": "Identifier of the target message", - "html_description": "Identifier of the target message", - "rst_description": "Identifier of the target message\n", + "description": "Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.", + "html_description": "Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.", + "rst_description": "Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.\n", "name": "message_id" }, { diff --git a/aiogram/client/bot.py b/aiogram/client/bot.py index 139496fe..a27d2b24 100644 --- a/aiogram/client/bot.py +++ b/aiogram/client/bot.py @@ -4314,12 +4314,12 @@ class Bot: request_timeout: Optional[int] = None, ) -> bool: """ - Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns :code:`True` on success. + Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#setmessagereaction :param chat_id: Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`) - :param message_id: Identifier of the target message + :param message_id: Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead. :param reaction: New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators. :param is_big: Pass :code:`True` to set the reaction with a big animation :param request_timeout: Request timeout diff --git a/aiogram/methods/set_message_reaction.py b/aiogram/methods/set_message_reaction.py index 87f08b32..f345051a 100644 --- a/aiogram/methods/set_message_reaction.py +++ b/aiogram/methods/set_message_reaction.py @@ -6,7 +6,7 @@ from .base import TelegramMethod class SetMessageReaction(TelegramMethod[bool]): """ - Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns :code:`True` on success. + Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#setmessagereaction """ @@ -17,7 +17,7 @@ class SetMessageReaction(TelegramMethod[bool]): chat_id: Union[int, str] """Unique identifier for the target chat or username of the target channel (in the format :code:`@channelusername`)""" message_id: int - """Identifier of the target message""" + """Identifier of the target message. If the message belongs to a media group, the reaction is set to the first non-deleted message in the group instead.""" reaction: Optional[List[Union[ReactionTypeEmoji, ReactionTypeCustomEmoji]]] = None """New list of reaction types to set on the message. Currently, as non-premium users, bots can set up to one reaction per message. A custom emoji reaction can be used if it is either already present on the message or explicitly allowed by chat administrators.""" is_big: Optional[bool] = None diff --git a/aiogram/types/message.py b/aiogram/types/message.py index b02ab69d..41c629af 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -3756,7 +3756,7 @@ class Message(MaybeInaccessibleMessage): - :code:`chat_id` - :code:`message_id` - Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns :code:`True` on success. + Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns :code:`True` on success. Source: https://core.telegram.org/bots/api#setmessagereaction