usernein / pyromod

A monkeypatcher add-on for Pyrogram
https://pyromod.pauxis.dev/
GNU Lesser General Public License v3.0
223 stars 70 forks source link

Fix: an exception when Client.stop_listening is called but the future is None #56

Open moha-abdi opened 4 months ago

moha-abdi commented 4 months ago

This is a simple change, you can reproduce the issue by creatting a Client.register_next_step_handler and then calling the stop_listening method, this will find the listener but the future will be None as register_next_step_handler doesn't use future and it will rise this error: 'NoneType' object has no attribute 'done'