You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: discord/client.py
+37-34Lines changed: 37 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -1024,11 +1024,20 @@ async def on_ready():
1024
1024
returncoro
1025
1025
1026
1026
defon_click(self, custom_id=None):
1027
-
"""A decorator that registers a raw_button_click event that checks on execution if the ``custom_id's`` are the same; if so, the :func:`func` is called..
1027
+
"""
1028
+
A decorator that registers a raw_button_click event that checks on execution if the ``custom_id's`` are the same; if so, the :func:`func` is called..
1029
+
1030
+
The function this is attached to must take the same parameters as a
"""A decorator with which you can assign a function to a specific :class:`SelectMenu` (or its custom_id).
1080
+
"""
1081
+
A decorator with which you can assign a function to a specific :class:`discord.SelectMenu` (or its custom_id).
1075
1082
1076
-
.. note::
1077
-
This will always give exactly one Parameter of type `discord.Interaction <./interaction.html#discord-interaction>`_ like an `raw_selection_select-Event <#on-raw-button-click>`_.
1083
+
The function this is attached to must take the same parameters as a
The Function this decorator attached to must be an corountine (means an awaitable)
1087
+
The func must be a coroutine, if not, :exc:`TypeError` is raised.
1081
1088
1082
1089
Parameters
1083
-
----------
1084
-
1085
-
:attr:`custom_id`: Optional[str]
1086
-
1087
-
If the :attr:`custom_id` of the SelectMenu could not use as an function name or you want to give the function a diferent name then the custom_id use this one to set the custom_id.
1090
+
-----------
1091
+
custom_id: Optional[str]
1092
+
If the :attr:`custom_id` of the :class:`discord.SelectMenu` could not use as an function name
1093
+
or you want to give the function a different name then the custom_id use this one to set the custom_id.
0 commit comments