mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 22:14:50 +00:00
Make add_handler return (handler, group) tuple
This commit is contained in:
parent
deed74840a
commit
53b0736975
1 changed files with 5 additions and 1 deletions
|
|
@ -263,7 +263,6 @@ class Client:
|
|||
|
||||
return decorator
|
||||
|
||||
# TODO: Maybe make add_handler return (handler, group)?
|
||||
def add_handler(self, handler, group: int = 0):
|
||||
"""Use this method to register an update handler.
|
||||
|
||||
|
|
@ -277,9 +276,14 @@ class Client:
|
|||
|
||||
group (``int``, optional):
|
||||
The group identifier, defaults to 0.
|
||||
|
||||
Returns:
|
||||
A tuple of (handler, group)
|
||||
"""
|
||||
self.dispatcher.add_handler(handler, group)
|
||||
|
||||
return handler, group
|
||||
|
||||
def remove_handler(self, handler, group: int = 0):
|
||||
"""Removes a previously-added update handler.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue