Skip to content

Commit 5fe8fba

Browse files
committed
Fix smart plugins load/unload documentation
1 parent 8b4c326 commit 5fe8fba

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

docs/source/topics/smart-plugins.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,9 @@ attribute. Here's an example:
316316
Unloading
317317
^^^^^^^^^
318318

319-
In order to unload a plugin, or any other handler, all you need to do is obtain a reference to it by importing the
320-
relevant module and call :meth:`~pyrogram.Client.remove_handler` Client's method with your function
321-
name preceded by the star ``*`` operator as argument. Example:
319+
In order to unload a plugin, all you need to do is obtain a reference to it by importing the relevant module and call
320+
:meth:`~pyrogram.Client.remove_handler` Client's method with your function's *handler* special attribute preceded by the
321+
star ``*`` operator as argument. Example:
322322

323323
- ``main.py``
324324

@@ -328,14 +328,14 @@ name preceded by the star ``*`` operator as argument. Example:
328328
329329
...
330330
331-
app.remove_handler(*echo)
331+
app.remove_handler(*echo.handler)
332332
333333
The star ``*`` operator is used to unpack the tuple into positional arguments so that *remove_handler* will receive
334334
exactly what is needed. The same could have been achieved with:
335335

336336
.. code-block:: python
337337
338-
handler, group = echo
338+
handler, group = echo.handler
339339
app.remove_handler(handler, group)
340340
341341
Loading
@@ -352,4 +352,4 @@ using :meth:`~pyrogram.Client.add_handler` instead. Example:
352352
353353
...
354354
355-
app.add_handler(*echo)
355+
app.add_handler(*echo.handler)

0 commit comments

Comments
 (0)