diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index 0fad3f41..42d85e9a 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -16,6 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . +import logging from functools import partial from typing import List, Match, Union, BinaryIO @@ -28,6 +29,8 @@ from pyrogram.parser import utils as parser_utils, Parser from ..object import Object from ..update import Update +log = logging.getLogger(__name__) + class Str(str): def __init__(self, *args): @@ -2706,12 +2709,12 @@ class Message(Object, Update): """ if as_copy: if self.service: - raise ValueError("Unable to copy service messages") - - if self.game and not await self._client.storage.is_bot(): - raise ValueError("Users cannot send messages with Game media type") - - if self.text: + log.warning(f"Service messages cannot be copied. " + f"chat_id: {self.chat.id}, message_id: {self.message_id}") + elif self.game and not await self._client.storage.is_bot(): + log.warning(f"Users cannot send messages with Game media type. " + f"chat_id: {self.chat.id}, message_id: {self.message_id}") + elif self.text: return await self._client.send_message( chat_id, text=self.text.html,