admin管理员组文章数量:1386947
@dp.message(WriteAppeal.message)
async def wrote(message: Message, state: FSMContext):
await bot.forward_message(chat_id=CHANNEL_ID, from_chat_id=message.chat.id, message_id=message.message_id)
await message.answer('Обращение благополучно отправлено!')
@dp.message(Command('answer'))
async def answering(message: Message):
try:
msg = message.reply_to_message
except AttributeError: return
print(msg.forward_from_chat)
print(msg.message_thread_id, msg.sender_chat)
await bot.send_message(msg.chat.id, f'Ответ на ваше обращение: \n {message.text}', reply_to_message_id=msg.message_id)
A message that is forwarded to another chat does not have the properties of the forwarded message.
Print data returns None everywhere.
How can I get the message id and the chat id from which the message was forwarded?
I tried to take all these id from forward_origin, but it only gave me MessageOriginUser, which doesn't contain anything I need. And I tried to try the method that is written in print
本文标签: pythonWhy does the message not have the properties it should have AiogramStack Overflow
版权声明:本文标题:python - Why does the message not have the properties it should have? Aiogram - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744571820a2613386.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论