diff --git a/telebot/__init__.py b/telebot/__init__.py index 466f939ce..b7df22505 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -1368,7 +1368,9 @@ def close(self) -> bool: def set_message_reaction(self, chat_id: Union[int, str], message_id: int, reaction: Optional[List[types.ReactionType]]=None, is_big: Optional[bool]=None) -> bool: """ - Use this method to set a reaction to a message in a chat. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns 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 True on success. Telegram documentation: https://core.telegram.org/bots/api#setmessagereaction @@ -1841,9 +1843,7 @@ def delete_message(self, chat_id: Union[int, str], message_id: int, def delete_messages(self, chat_id: Union[int, str], message_ids: List[int]): """ - Use this method to delete multiple messages in a chat. - The number of messages to be deleted must not exceed 100. - If the chat is a private chat, the user must be an administrator of the chat for this to work and must have the appropriate admin rights. + Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success. Telegram documentation: https://core.telegram.org/bots/api#deletemessages @@ -1863,7 +1863,11 @@ def delete_messages(self, chat_id: Union[int, str], message_ids: List[int]): def forward_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, int], message_ids: List[int], disable_notification: Optional[bool]=None, message_thread_id: Optional[int]=None, protect_content: Optional[bool]=None) -> List[types.MessageID]: """ - Use this method to forward messages of any kind. + Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. + Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. + On success, an array of MessageId of the sent messages is returned. + + Telegram documentation: https://core.telegram.org/bots/api#forwardmessages :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername) :type chat_id: :obj:`int` or :obj:`str` @@ -1901,7 +1905,14 @@ def copy_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, int], disable_notification: Optional[bool] = None, message_thread_id: Optional[int] = None, protect_content: Optional[bool] = None, remove_caption: Optional[bool] = None) -> List[types.MessageID]: """ - Use this method to copy messages of any kind. + Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. + Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. + A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. + The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. + Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned. + + Telegram documentation: https://core.telegram.org/bots/api#copymessages + :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername) :type chat_id: :obj:`int` or :obj:`str` diff --git a/telebot/async_telebot.py b/telebot/async_telebot.py index 38f1ef1c8..dd61a9ad6 100644 --- a/telebot/async_telebot.py +++ b/telebot/async_telebot.py @@ -2422,7 +2422,9 @@ async def get_webhook_info(self, timeout: Optional[int]=None) -> types.WebhookIn async def set_message_reaction(self, chat_id: Union[int, str], message_id: int, reaction: Optional[List[types.ReactionType]]=None, is_big: Optional[bool]=None) -> bool: """ - Use this method to set a reaction to a message in a chat. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns 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 True on success. Telegram documentation: https://core.telegram.org/bots/api#setmessagereaction @@ -2911,10 +2913,8 @@ async def delete_message(self, chat_id: Union[int, str], message_id: int, async def delete_messages(self, chat_id: Union[int, str], message_ids: List[int]): """ - Use this method to delete multiple messages in a chat. - The number of messages to be deleted must not exceed 100. - If the chat is a private chat, the user must be an administrator of the chat for this to work and must have the appropriate admin rights. - Returns True on success. + Use this method to delete multiple messages simultaneously. + If some of the specified messages can't be found, they are skipped. Returns True on success. Telegram documentation: https://core.telegram.org/bots/api#deletemessages @@ -2932,7 +2932,11 @@ async def delete_messages(self, chat_id: Union[int, str], message_ids: List[int] async def forward_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, int], message_ids: List[int], disable_notification: Optional[bool]=None, message_thread_id: Optional[int]=None, protect_content: Optional[bool]=None) -> List[types.MessageID]: """ - Use this method to forward messages of any kind. + Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, + they are skipped. Service messages and messages with protected content can't be forwarded. + Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned. + + Telegram documentation: https://core.telegram.org/bots/api#forwardmessages :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername) :type chat_id: :obj:`int` or :obj:`str` @@ -2965,7 +2969,13 @@ async def copy_messages(self, chat_id: Union[str, int], from_chat_id: Union[str, disable_notification: Optional[bool] = None, message_thread_id: Optional[int] = None, protect_content: Optional[bool] = None, remove_caption: Optional[bool] = None) -> List[types.MessageID]: """ - Use this method to copy messages of any kind. + Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. + Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied + only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but + the copied messages don't have a link to the original message. Album grouping is kept for copied messages. + On success, an array of MessageId of the sent messages is returned. + + Telegram documentation: https://core.telegram.org/bots/api#copymessages :param chat_id: Unique identifier for the target chat or username of the target channel (in the format @channelusername) :type chat_id: :obj:`int` or :obj:`str`