@@ -339,8 +339,7 @@ def on_click(cls, custom_id: Optional[Union[Pattern[AnyStr], AnyStr]] = None) ->
339339 [Awaitable [Any ]], Awaitable [Any ]
340340 ]:
341341 """
342- A decorator that registers a raw_button_click event that checks on execution if the ``custom_id's`` are the same;
343- if so, the :func:`func` is called.
342+ A decorator with wich you can assign a function to a specific :class:`~discord.Button` (or its custom_id).
344343
345344 .. important::
346345 The function this is attached to must take the same parameters as a
@@ -356,10 +355,11 @@ def on_click(cls, custom_id: Optional[Union[Pattern[AnyStr], AnyStr]] = None) ->
356355 or you want to give the function a different name then the custom_id use this one to set the custom_id.
357356 You can also specify a regex and if the custom_id matches it, the function will be executed.
358357
359- .. note::
360- As the :attr:`custom_id` is converted to a :class:`re.Pattern` put ``^`` in front and ``$`` at the end
361- of the :attr:`custom_id` if you want that the custom_id must exactly match the specified value.
362- Otherwise, something like 'cool blue Button is blue' will let the function bee invoked too.
358+ .. note::
359+ As the :attr:`custom_id` is converted to a `Pattern <https://docs.python.org/3.9/library/re.html#re-objects>`_
360+ put ``^`` in front and ``$`` at the end
361+ of the :attr:`custom_id` if you want that the custom_id must exactly match the specified value.
362+ Otherwise, something like 'cool blue Button is blue' will let the function bee invoked too.
363363
364364 Example
365365 -------
@@ -402,7 +402,7 @@ def on_select(cls, custom_id: Optional[Union[Pattern[AnyStr], AnyStr]] = None) -
402402 [Awaitable [Any ]], Awaitable [Any ]
403403 ]:
404404 """
405- A decorator with which you can assign a function to a specific :class:`~SelectMenu` (or its custom_id).
405+ A decorator with which you can assign a function to a specific :class:`~discord. SelectMenu` (or its custom_id).
406406
407407 .. important::
408408 The function this is attached to must take the same parameters as a
@@ -414,14 +414,15 @@ def on_select(cls, custom_id: Optional[Union[Pattern[AnyStr], AnyStr]] = None) -
414414 Parameters
415415 -----------
416416 custom_id: Optional[Union[Pattern[AnyStr], AnyStr]]
417- If the :attr:`custom_id` of the :class:`discord.SelectMenu` could not use as a function name,
417+ If the :attr:`custom_id` of the :class:`~ discord.SelectMenu` could not use as a function name,
418418 or you want to give the function a different name then the custom_id use this one to set the custom_id.
419419 You can also specify a regex and if the custom_id matches it, the function will be executed.
420420
421- .. note::
422- As the :attr:`custom_id` is converted to a :class:`re.Pattern` put ``^`` in front and ``$`` at the end
423- of the :attr:`custom_id` if you want that the custom_id must exactly match the specified value.
424- Otherwise, something like 'choose_your_gender later' will let the function bee invoked too.
421+ .. note::
422+ As the :attr:`custom_id` is converted to a `Pattern <https://docs.python.org/3.9/library/re.html#re-objects>`_
423+ put ``^`` in front and ``$`` at the end
424+ of the :attr:`custom_id` if you want that the custom_id must exactly match the specified value.
425+ Otherwise, something like 'choose_your_gender later' will let the function bee invoked too.
425426
426427 Example
427428 -------
@@ -468,8 +469,7 @@ def on_submit(self, custom_id: Optional[Union[Pattern[AnyStr], AnyStr]] = None)
468469 [Awaitable [Any ]], Awaitable [Any ]
469470 ]:
470471 """
471- A decorator that registers an :attr:`on_modal_submit` event that checks on execution if the ``custom_id's`` are the same;
472- if so, the :func:`func` is called.
472+ A decorator with wich you can assign a function to a specific :class:`~discord.Modal` (or its custom_id).
473473
474474 .. important::
475475 The function this is attached to must take the same parameters as a
@@ -481,14 +481,15 @@ def on_submit(self, custom_id: Optional[Union[Pattern[AnyStr], AnyStr]] = None)
481481 Parameters
482482 ----------
483483 custom_id: Optional[Union[Pattern[AnyStr], AnyStr]]
484- If the :attr:`custom_id` of the :class:`discord.Modal` could not use as a function name,
484+ If the :attr:`custom_id` of the :class:`~ discord.Modal` could not use as a function name,
485485 or you want to give the function a different name then the custom_id use this one to set the custom_id.
486486 You can also specify a regex and if the custom_id matches it, the function will be executed.
487487
488- .. note::
489- As the :attr:`custom_id` is converted to a :class:`re.Pattern` put ``^`` in front and ``$`` at the end
490- of the :attr:`custom_id` if you want that the custom_id must exactly match the specified value.
491- Otherwise, something like 'suggestions_modal_submit_private' will let the function bee invoked too.
488+ .. note::
489+ As the :attr:`custom_id` is converted to a `Pattern <https://docs.python.org/3.9/library/re.html#re-objects>`_
490+ put ``^`` in front and ``$`` at the end
491+ of the :attr:`custom_id` if you want that the custom_id must exactly match the specified value.
492+ Otherwise, something like 'suggestions_modal_submit_private' will let the function bee invoked too.
492493
493494 Example
494495 -------
0 commit comments