diff --git a/server/custom.py b/server/custom.py index 2aac911..8018cfa 100644 --- a/server/custom.py +++ b/server/custom.py @@ -283,7 +283,10 @@ async def handle_operator_message(message: types.Message, super_chat_id: int, bo # в супер-чате кто-то пишет сообщение сам себе, только для личных сообщений if bot.enable_mailing: asyncio.create_task(MailingUser.get_or_create(telegram_id=message.chat.id, bot=bot)) - await message.forward(super_chat_id) + try: + await message.forward(super_chat_id) + except exceptions.MessageCantBeForwarded: + await message.copy_to(super_chat_id) # И отправить пользователю специальный текст, если он указан if bot.second_text: return SendMessage(chat_id=message.chat.id, text=bot.second_text, parse_mode="HTML")