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
Decorator that add permissions. This will set the permissions for a single guild, you can use it more than once for each command.
879
+
879
880
:param guild_id: ID of the guild for the permissions.
880
881
:type guild_id: int
881
-
:param permissions: Permission requirements of the slash command. Default ``None``.
882
-
:type permissions: dict
883
-
882
+
:param permissions: List of permissions to be set for the specified guild.
883
+
:type permissions: list
884
884
"""
885
885
886
886
defwrapper(cmd):
@@ -908,9 +908,9 @@ def add_component_callback(
908
908
:param Coroutine callback: The coroutine to be called when the component is interacted with. Must accept a single argument with the type :class:`.context.ComponentContext`.
909
909
:param messages: If specified, only interactions from the message given will be accepted. Can be a message object to check for, or the message ID or list of previous two. Empty list will mean that no interactions are accepted.
910
910
:type messages: Union[discord.Message, int, list]
911
-
:param components: If specified, only interactions with ``custom_id``s of given components will be accepted. Defaults to the name of ``callback`` if ``use_callback_name=True``. Can be a custom ID (str) or component dict (actionrow or button) or list of previous two.
911
+
:param components: If specified, only interactions with ``custom_id`` of given components will be accepted. Defaults to the name of ``callback`` if ``use_callback_name=True``. Can be a custom ID (str) or component dict (actionrow or button) or list of previous two.
912
912
:type components: Union[str, dict, list]
913
-
:param use_callback_name: Whether the ``custom_id`` defaults to the name of ``callback`` if unspecified. If ``False``, either `messages`` or ``components`` must be specified.
913
+
:param use_callback_name: Whether the ``custom_id`` defaults to the name of ``callback`` if unspecified. If ``False``, either ``messages`` or ``components`` must be specified.
914
914
:type use_callback_name: bool
915
915
:param component_type: The type of the component to avoid collisions with other component types. See :class:`.model.ComponentType`.
:param message_id: If specified, only removes the callback for the specific message ID.
1016
1016
:type message_id: Optional[int]
1017
-
:param custom_id: The `custom_id` of the component.
1017
+
:param custom_id: The ``custom_id`` of the component.
1018
1018
:type custom_id: Optional[str]
1019
1019
:param component_type: The type of the component. See :class:`.model.ComponentType`.
1020
1020
:type component_type: Optional[int]
@@ -1067,9 +1067,9 @@ def component_callback(
1067
1067
1068
1068
:param messages: If specified, only interactions from the message given will be accepted. Can be a message object to check for, or the message ID or list of previous two. Empty list will mean that no interactions are accepted.
1069
1069
:type messages: Union[discord.Message, int, list]
1070
-
:param components: If specified, only interactions with ``custom_id``s of given components will be accepted. Defaults to the name of ``callback`` if ``use_callback_name=True``. Can be a custom ID (str) or component dict (actionrow or button) or list of previous two.
1070
+
:param components: If specified, only interactions with ``custom_id`` of given components will be accepted. Defaults to the name of ``callback`` if ``use_callback_name=True``. Can be a custom ID (str) or component dict (actionrow or button) or list of previous two.
1071
1071
:type components: Union[str, dict, list]
1072
-
:param use_callback_name: Whether the ``custom_id`` defaults to the name of ``callback`` if unspecified. If ``False``, either `messages`` or ``components`` must be specified.
1072
+
:param use_callback_name: Whether the ``custom_id`` defaults to the name of ``callback`` if unspecified. If ``False``, either ``messages`` or ``components`` must be specified.
1073
1073
:type use_callback_name: bool
1074
1074
:param component_type: The type of the component to avoid collisions with other component types. See :class:`.model.ComponentType`.
:param messages: If specified, only interactions from the message given will be accepted. Can be a message object to check for, or the message ID or list of previous two. Empty list will mean that no interactions are accepted.
192
223
:type messages: Union[discord.Message, int, list]
193
-
:param components: If specified, only interactions with ``custom_id``s of given components will be accepted. Defaults to the name of ``callback`` if ``use_callback_name=True``. Can be a custom ID (str) or component dict (actionrow or button) or list of previous two.
224
+
:param components: If specified, only interactions with ``custom_id`` of given components will be accepted. Defaults to the name of ``callback`` if ``use_callback_name=True``. Can be a custom ID (str) or component dict (actionrow or button) or list of previous two.
194
225
:type components: Union[str, dict, list]
195
-
:param use_callback_name: Whether the ``custom_id`` defaults to the name of ``callback`` if unspecified. If ``False``, either `messages`` or ``components`` must be specified.
226
+
:param use_callback_name: Whether the ``custom_id`` defaults to the name of ``callback`` if unspecified. If ``False``, either ``messages`` or ``components`` must be specified.
196
227
:type use_callback_name: bool
197
228
:param component_type: The type of the component to avoid collisions with other component types. See :class:`.model.ComponentType`.
0 commit comments