Skip to content

Commit 7046c49

Browse files
author
Pietro Albini
committed
Fix API documentation for Component.message_matches
1 parent 173a7e8 commit 7046c49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/api/components.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ about how to create them in the ":ref:`custom-components`" chapter.
104104
:param bool multiple: If the function should be called multiple times on
105105
multiple matches.
106106

107-
.. py:method:: add_message_matches_hook(func)
107+
.. py:method:: add_message_matches_hook(regex, func, [flags=0, multiple=False])
108108
109109
The function provided to this method will be called only if the
110110
processed message matches the ``regex`` you provided. You may also
@@ -121,7 +121,7 @@ about how to create them in the ":ref:`custom-components`" chapter.
121121
If the function returns ``True``, then the message processing is stopped,
122122
and no more functions will be called for that update.
123123

124-
:param str string: The string you want contained in the message
124+
:param str regex: The regular expression the message should match
125125
:param callable func: The function you want to use.
126126
:param int flags: ``re`` module's flags
127127
:param bool multiple: If the function should be called multiple times on

0 commit comments

Comments
 (0)