Pyrubi icon indicating copy to clipboard operation
Pyrubi copied to clipboard

باگ در دیلیت پیام

Open C4ssif3r opened this issue 5 months ago • 2 comments

سلام اقای گنجی من داشتم کتابخونه خودم رو توسعه میدادم که متوجه شدم یسری نواقص داره دقیقا کتابخونه شماهم همین نواقص رو داره مثلا وقتی از متود message.delete() برای پیام هایی که حاوی گیف، عکس، ویدیو هستند استفاده میشه این اررور رو میده:

**Exception in thread Thread-17 (send_hello): Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() File "/data/data/com.termux/files/usr/lib/python3.11/threading.py", line 982, in run self._target(*self._args, **self._kwargs) File "", line 9, in send_hello File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pyrubi/types/socket/message.py", line 62, in reply_message_id return self.data["message_updates"][0]["message"].get("reply_to_message_id") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ KeyError: 'message' None None

Exception in thread Thread-18 (send_hello): Traceback (most recent call last): File "/data/data/com.termux/files/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() File "/data/data/com.termux/files/usr/lib/python3.11/threading.py", line 982, in run self._target(*self._args, self._kwargs) File "", line 11, in send_hello File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pyrubi/types/socket/message.py", line 172, in delete return self.methods.deleteMessages(objectGuid=self.object_guid, messageIds=[self.message_id], deleteForAll=delete_for_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pyrubi/methods/methods.py", line 988, in deleteMessages return self.network.request( ^^^^^^^^^^^^^^^^^^^^^ File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pyrubi/network/network.py", line 80, in request raise { pyrubi.exceptions.InvalidInput: Some input given to the method is invalid!

فیکس کردنش کاری نداره یه try except هست . مچکرم!

C4ssif3r avatar Sep 08 '24 01:09 C4ssif3r