2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-29 05:18:10 +00:00

Update client.py

This commit is contained in:
Dan 2018-04-30 10:15:34 +02:00 committed by GitHub
parent bb607e56be
commit f824e69b5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,12 +243,13 @@ class Client:
return func
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.
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).
Args:
@ -264,7 +265,7 @@ class Client:
"""Removes a previously-added update handler.
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.
Args: