File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
pyrogram/types/messages_and_media Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 1616# You should have received a copy of the GNU Lesser General Public License
1717# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818
19+ import logging
1920from functools import partial
2021from typing import List , Match , Union , BinaryIO
2122
2829from ..object import Object
2930from ..update import Update
3031
32+ log = logging .getLogger (__name__ )
33+
3134
3235class Str (str ):
3336 def __init__ (self , * args ):
@@ -2706,12 +2709,12 @@ async def forward(
27062709 """
27072710 if as_copy :
27082711 if self .service :
2709- raise ValueError ( "Unable to copy service messages" )
2710-
2711- if self .game and not await self ._client .storage .is_bot ():
2712- raise ValueError ( "Users cannot send messages with Game media type" )
2713-
2714- if self .text :
2712+ log . warning ( f"Service messages cannot be copied. "
2713+ f"chat_id: { self . chat . id } , message_id: { self . message_id } " )
2714+ elif self .game and not await self ._client .storage .is_bot ():
2715+ log . warning ( f "Users cannot send messages with Game media type. "
2716+ f"chat_id: { self . chat . id } , message_id: { self . message_id } " )
2717+ elif self .text :
27152718 return await self ._client .send_message (
27162719 chat_id ,
27172720 text = self .text .html ,
You can’t perform that action at this time.
0 commit comments