TeamUltroid / Ultroid

Advanced Multi-Featured Telegram UserBot, Built in Python Using Telethon lib.
https://ultroid.tech
GNU Affero General Public License v3.0
2.83k stars 7.92k forks source link

TypeError: Cannot cast NoneType to any kind of Peer #317

Closed alicenine closed 2 years ago

alicenine commented 2 years ago

Contact Details

No response

What happened?

Happens when I send /start to my assistant bot

Version

0.3

Hosted On

Vps

Relevant logs output

Traceback (most recent call last):
0|Ultroid  |   File "/home/ubuntu/.local/lib/python3.8/site-packages/pyUltroid/_misc/_assistant.py", line 72, in wrapper
0|Ultroid  |     await func(event)
0|Ultroid  |   File "/home/ubuntu/Ultroid/plugins/_inline.py", line 167, in help_func
0|Ultroid  |     await ult.edit(
0|Ultroid  |   File "/home/ubuntu/.local/lib/python3.8/site-packages/telethon/events/callbackquery.py", line 332, in edit
0|Ultroid  |     return await self._client.edit_message(
0|Ultroid  |   File "/home/ubuntu/.local/lib/python3.8/site-packages/telethon/client/messages.py", line 1217, in edit_message
0|Ultroid  |     entity = await self.get_input_entity(entity)
0|Ultroid  |   File "/home/ubuntu/.local/lib/python3.8/site-packages/telethon/client/users.py", line 468, in get_input_entity
0|Ultroid  |     peer = utils.get_peer(peer)
0|Ultroid  |   File "/home/ubuntu/.local/lib/python3.8/site-packages/telethon/utils.py", line 1035, in get_peer
0|Ultroid  |     _raise_cast_fail(peer, "Peer")
0|Ultroid  |   File "/home/ubuntu/.local/lib/python3.8/site-packages/telethon/utils.py", line 134, in _raise_cast_fail
0|Ultroid  |     raise TypeError(
0|Ultroid  | TypeError: Cannot cast NoneType to any kind of Peer.

Acknowledgement

Exekutori commented 2 years ago

how did u resolved?