mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 05:18:10 +00:00
Update client.py
This commit is contained in:
parent
bb607e56be
commit
f824e69b5a
@ -243,12 +243,13 @@ class Client:
|
|||||||
return func
|
return func
|
||||||
|
|
||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
|
# TODO: Maybe make add_handler return (handler, group)?
|
||||||
def add_handler(self, handler, group: int = 0):
|
def add_handler(self, handler, group: int = 0):
|
||||||
"""Use this method to register an update handler.
|
"""Use this method to register an update handler.
|
||||||
|
|
||||||
You can register multiple handlers, but at most one handler within a group
|
You can register multiple handlers, but at most one handler within a group
|
||||||
will be used for a single event. To handle the same event more than once, register
|
will be used for a single update. To handle the same update more than once, register
|
||||||
your handler using a different group id (lower group id == higher priority).
|
your handler using a different group id (lower group id == higher priority).
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@ -264,7 +265,7 @@ class Client:
|
|||||||
"""Removes a previously-added update handler.
|
"""Removes a previously-added update handler.
|
||||||
|
|
||||||
Make sure to provide the right group that the handler was added in. You can use
|
Make sure to provide the right group that the handler was added in. You can use
|
||||||
the return value of the ``add_handler`` method, a tuple of (handler, group), and
|
the return value of the :meth:`add_handler` method, a tuple of (handler, group), and
|
||||||
pass it directly.
|
pass it directly.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user