diff --git a/disnake/ui/button.py b/disnake/ui/button.py index 39427da407..bfcccb663f 100644 --- a/disnake/ui/button.py +++ b/disnake/ui/button.py @@ -291,13 +291,12 @@ def button( Parameters ---------- - cls: Type[:class:`Button`] - The button subclass to create an instance of. If provided, the following parameters - described below do not apply. Instead, this decorator will accept the same keywords - as the passed cls does. + cls: Callable[..., :class:`Button`] + A callable (may be a :class:`Button` subclass) to create a new instance of this component. + If provided, the other parameters described below do not apply. + Instead, this decorator will accept the same keywords as the passed callable/class does. .. versionadded:: 2.6 - label: Optional[:class:`str`] The label of the button, if any. custom_id: Optional[:class:`str`] diff --git a/disnake/ui/select/channel.py b/disnake/ui/select/channel.py index a5f0385408..f27c7a2107 100644 --- a/disnake/ui/select/channel.py +++ b/disnake/ui/select/channel.py @@ -224,10 +224,10 @@ def channel_select( Parameters ---------- - cls: Type[:class:`ChannelSelect`] - The select subclass to create an instance of. If provided, the following parameters - described below do not apply. Instead, this decorator will accept the same keywords - as the passed cls does. + cls: Callable[..., :class:`ChannelSelect`] + A callable (may be a :class:`ChannelSelect` subclass) to create a new instance of this component. + If provided, the other parameters described below do not apply. + Instead, this decorator will accept the same keywords as the passed callable/class does. placeholder: Optional[:class:`str`] The placeholder text that is shown if nothing is selected, if any. custom_id: :class:`str` diff --git a/disnake/ui/select/mentionable.py b/disnake/ui/select/mentionable.py index cb495e0b6a..1cc0be5b8a 100644 --- a/disnake/ui/select/mentionable.py +++ b/disnake/ui/select/mentionable.py @@ -203,10 +203,10 @@ def mentionable_select( Parameters ---------- - cls: Type[:class:`MentionableSelect`] - The select subclass to create an instance of. If provided, the following parameters - described below do not apply. Instead, this decorator will accept the same keywords - as the passed cls does. + cls: Callable[..., :class:`MentionableSelect`] + A callable (may be a :class:`MentionableSelect` subclass) to create a new instance of this component. + If provided, the other parameters described below do not apply. + Instead, this decorator will accept the same keywords as the passed callable/class does. placeholder: Optional[:class:`str`] The placeholder text that is shown if nothing is selected, if any. custom_id: :class:`str` diff --git a/disnake/ui/select/role.py b/disnake/ui/select/role.py index 283bed8bd1..439749a136 100644 --- a/disnake/ui/select/role.py +++ b/disnake/ui/select/role.py @@ -188,10 +188,10 @@ def role_select( Parameters ---------- - cls: Type[:class:`RoleSelect`] - The select subclass to create an instance of. If provided, the following parameters - described below do not apply. Instead, this decorator will accept the same keywords - as the passed cls does. + cls: Callable[..., :class:`RoleSelect`] + A callable (may be a :class:`RoleSelect` subclass) to create a new instance of this component. + If provided, the other parameters described below do not apply. + Instead, this decorator will accept the same keywords as the passed callable/class does. placeholder: Optional[:class:`str`] The placeholder text that is shown if nothing is selected, if any. custom_id: :class:`str` diff --git a/disnake/ui/select/string.py b/disnake/ui/select/string.py index 80f13e48ee..b336dfa388 100644 --- a/disnake/ui/select/string.py +++ b/disnake/ui/select/string.py @@ -293,13 +293,12 @@ def string_select( Parameters ---------- - cls: Type[:class:`StringSelect`] - The select subclass to create an instance of. If provided, the following parameters - described below do not apply. Instead, this decorator will accept the same keywords - as the passed cls does. + cls: Callable[..., :class:`StringSelect`] + A callable (may be a :class:`StringSelect` subclass) to create a new instance of this component. + If provided, the other parameters described below do not apply. + Instead, this decorator will accept the same keywords as the passed callable/class does. .. versionadded:: 2.6 - placeholder: Optional[:class:`str`] The placeholder text that is shown if nothing is selected, if any. custom_id: :class:`str` diff --git a/disnake/ui/select/user.py b/disnake/ui/select/user.py index 36c237cb75..2dd20d40f6 100644 --- a/disnake/ui/select/user.py +++ b/disnake/ui/select/user.py @@ -190,10 +190,10 @@ def user_select( Parameters ---------- - cls: Type[:class:`UserSelect`] - The select subclass to create an instance of. If provided, the following parameters - described below do not apply. Instead, this decorator will accept the same keywords - as the passed cls does. + cls: Callable[..., :class:`UserSelect`] + A callable (may be a :class:`UserSelect` subclass) to create a new instance of this component. + If provided, the other parameters described below do not apply. + Instead, this decorator will accept the same keywords as the passed callable/class does. placeholder: Optional[:class:`str`] The placeholder text that is shown if nothing is selected, if any. custom_id: :class:`str`