mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 07:50:32 +00:00
parent
707988bf03
commit
19e97de8cb
1 changed files with 4 additions and 3 deletions
|
|
@ -74,11 +74,12 @@ class Handler:
|
|||
:param handler: callback
|
||||
:return:
|
||||
"""
|
||||
|
||||
for handler_obj in self.handlers:
|
||||
registered = handler_obj.handler
|
||||
if handler in self.handlers:
|
||||
self.handlers.remove(handler)
|
||||
if handler == handler_obj or handler == handler_obj.handler:
|
||||
self.handlers.remove(handler_obj)
|
||||
return True
|
||||
|
||||
raise ValueError('This handler is not registered!')
|
||||
|
||||
async def notify(self, *args):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue