Код должен дать всю информацию об пересланном сообщении но код выдаёт
Task exception was never retrieved
future: <Task finished name='Task-9' coro=<Dispatcher._process_polling_updates() done, defined at C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\aiogram\dispatcher\dispatcher.py:407> exception=TypeError('can only concatenate str (not "NoneType") to str')>
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\aiogram\dispatcher\dispatcher.py", line 415, in _process_polling_updates
for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\aiogram\dispatcher\dispatcher.py", line 235, in process_updates
return await asyncio.gather(*tasks)
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\aiogram\dispatcher\handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\aiogram\dispatcher\dispatcher.py", line 256, in process_update
return await self.message_handlers.notify(update.message)
File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\aiogram\dispatcher\handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
File "c:\Users\User\Desktop\TBB\bot.py", line 51, in forwarded_example
await message.answer("информация:\nid:"+str(message.forward_from.id)+"\nфи:"+message.forward_from.first_name+" "+message.forward_from.last_name+"\nесть ли premium "+str(message.forward_from.is_premium)+"\nкод языка:"+str(message.forward_from.language_code)+"\nюзернейм:@"+str(message.forward_from.username)+"\nвозможность входить в группы(не всегда работает):"+str(message.forward_from.can_join_groups)+"\nбот ли?:"+str(message.forward_from.is_bot))
TypeError: can only concatenate str (not "NoneType") to str
КУСОК кода
@dp.message_handler(is_forwarded=True)
@dp.message_handler(filters.ForwardedMessageFilter(True))
async def forwarded_example(message: types.Message):
await message.answer("информация:\nid:"+str(message.forward_from.id)+"\nфи:"+message.forward_from.first_name+" "+message.forward_from.last_name+"\nесть ли premium "+str(message.forward_from.is_premium)+"\nкод языка:"+str(message.forward_from.language_code)+"\nюзернейм:@"+str(message.forward_from.username)+"\nвозможность входить в группы(не всегда работает):"+str(message.forward_from.can_join_groups)+"\nбот ли?:"+str(message.forward_from.is_bot))