Document how decorated functions are modified
This commit is contained in:
parent
2ae8730b22
commit
6a9c7312cc
@ -27,6 +27,13 @@ class OnCallbackQuery(BaseClient):
|
||||
callback queries. This does the same thing as :meth:`add_handler` using the
|
||||
:class:`CallbackQueryHandler`.
|
||||
|
||||
.. note::
|
||||
This decorator will wrap your defined function in a tuple consisting of *(Handler, group)*.
|
||||
|
||||
To reference your own function after it has been decorated, you need to access
|
||||
*my_function[0].callback*, that is, the *callback* field of Handler object which is the the
|
||||
first element in the tuple.
|
||||
|
||||
Args:
|
||||
filters (:obj:`Filters <pyrogram.Filters>`):
|
||||
Pass one or more filters to allow only a subset of callback queries to be passed
|
||||
|
@ -27,6 +27,13 @@ class OnDeletedMessages(BaseClient):
|
||||
deleted messages. This does the same thing as :meth:`add_handler` using the
|
||||
:class:`DeletedMessagesHandler`.
|
||||
|
||||
.. note::
|
||||
This decorator will wrap your defined function in a tuple consisting of *(Handler, group)*.
|
||||
|
||||
To reference your own function after it has been decorated, you need to access
|
||||
*my_function[0].callback*, that is, the *callback* field of Handler object which is the the
|
||||
first element in the tuple.
|
||||
|
||||
Args:
|
||||
filters (:obj:`Filters <pyrogram.Filters>`):
|
||||
Pass one or more filters to allow only a subset of messages to be passed
|
||||
|
@ -27,6 +27,13 @@ class OnMessage(BaseClient):
|
||||
messages. This does the same thing as :meth:`add_handler` using the
|
||||
:class:`MessageHandler`.
|
||||
|
||||
.. note::
|
||||
This decorator will wrap your defined function in a tuple consisting of *(Handler, group)*.
|
||||
|
||||
To reference your own function after it has been decorated, you need to access
|
||||
*my_function[0].callback*, that is, the *callback* field of Handler object which is the the
|
||||
first element in the tuple.
|
||||
|
||||
Args:
|
||||
filters (:obj:`Filters <pyrogram.Filters>`):
|
||||
Pass one or more filters to allow only a subset of messages to be passed
|
||||
|
@ -26,6 +26,13 @@ class OnRawUpdate(BaseClient):
|
||||
raw updates. This does the same thing as :meth:`add_handler` using the
|
||||
:class:`RawUpdateHandler`.
|
||||
|
||||
.. note::
|
||||
This decorator will wrap your defined function in a tuple consisting of *(Handler, group)*.
|
||||
|
||||
To reference your own function after it has been decorated, you need to access
|
||||
*my_function[0].callback*, that is, the *callback* field of Handler object which is the the
|
||||
first element in the tuple.
|
||||
|
||||
Args:
|
||||
group (``int``, *optional*):
|
||||
The group identifier, defaults to 0.
|
||||
|
@ -27,6 +27,13 @@ class OnUserStatus(BaseClient):
|
||||
user status updates. This does the same thing as :meth:`add_handler` using the
|
||||
:class:`UserStatusHandler`.
|
||||
|
||||
.. note::
|
||||
This decorator will wrap your defined function in a tuple consisting of *(Handler, group)*.
|
||||
|
||||
To reference your own function after it has been decorated, you need to access
|
||||
*my_function[0].callback*, that is, the *callback* field of Handler object which is the the
|
||||
first element in the tuple.
|
||||
|
||||
Args:
|
||||
filters (:obj:`Filters <pyrogram.Filters>`):
|
||||
Pass one or more filters to allow only a subset of UserStatus updated to be passed in your function.
|
||||
|
Loading…
Reference in New Issue
Block a user