Repository: Rapptz/discord.py
File: discord/ui/select.py (Python)

Code before:
        row: Optional[int] = None,
        default_values: List[ValidDefaultValues] = MISSING,
    ) -> None:
        super().__init__(
            self.type,
            custom_id=custom_id,
            placeholder=placeholder,
            min_values=min_values,
            max_values=max_values,
            disabled=disabled,
            row=row,
            default_values=MISSING
            if default_values is MISSING
            else self._handle_select_defaults(default_values, SelectDefaultValueType.user),
        )

    @property
    def type(self) -> Literal[ComponentType.user_select]:
        """:class:`.ComponentType`: The type of this component."""
        return ComponentType.user_select

    @property
    def values(self) -> List[Union[Member, User]]:
        """List[Union[:class:`discord.Member`, :class:`discord.User`]]: A list of members
        and users that have been selected by the user.

        If this is sent a private message, it will only allow
        the user to select the client or themselves. Every selected option in a private
        message will resolve to a :class:`discord.User`.

        If invoked in a guild, the values will always resolve to :class:`discord.Member`.
        """
        return super().values  # type: ignore

    @property
    def default_values(self) -> List[SelectDefaultValue]:
        """List[:class:`discord.SelectDefaultValue`]: A list of default values for the select menu.

        .. versionchanged:: 2.4
        """
        return self._underlying.default_values

    @default_values.setter
    def default_values(self, value: List[ValidDefaultValues]) -> None:
        self._underlying.default_values = self._handle_select_defaults(value, SelectDefaultValueType.user)


class RoleSelect(BaseSelect[V]):
    """Represents a UI select menu with a list of predefined options with the current roles of the guild.

    Please note that if you use this in a private message with a user, no roles will be displayed to the user.

Review comment (suggestion):
I'm not big on this being in the `__repr__`. I mentioned this in another PR but I know this was done because for some reason the factory uses this as a way to know how to construct it. This should change, but it's outside of the scope of the PR.

Code after:
    custom_id: :class:`str`
        The ID of the select menu that gets received during an interaction.
        If not given then one is generated for you.
    placeholder: Optional[:class:`str`]
        The placeholder text that is shown if nothing is selected, if any.
    min_values: :class:`int`
        The minimum number of items that must be chosen for this select menu.
        Defaults to 1 and must be between 0 and 25.
    max_values: :class:`int`
        The maximum number of items that must be chosen for this select menu.
        Defaults to 1 and must be between 1 and 25.
    disabled: :class:`bool`
        Whether the select is disabled or not.
    default_values: Sequence[:class:`~discord.abc.Snowflake`]
        A list of objects representing the users that should be selected by default.

        .. versionadded:: 2.4
    row: Optional[:class:`int`]
        The relative row this select menu belongs to. A Discord component can only have 5
        rows. By default, items are arranged automatically into those 5 rows. If you'd
        like to control the relative positioning of the row then passing an index is advised.
        For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic
        ordering. The row number must be between 0 and 4 (i.e. zero indexed).
    """

    __item_repr_attributes__ = BaseSelect.__item_repr_attributes__ + ('default_values',)

    def __init__(
        self,
        *,
        custom_id: str = MISSING,
        placeholder: Optional[str] = None,
        min_values: int = 1,
        max_values: int = 1,
        disabled: bool = False,
        row: Optional[int] = None,
        default_values: Sequence[ValidDefaultValues] = MISSING,
    ) -> None:
        super().__init__(
            self.type,
            custom_id=custom_id,
            placeholder=placeholder,
            min_values=min_values,
            max_values=max_values,
            disabled=disabled,
            row=row,
            default_values=_handle_select_defaults(default_values, self.type),
        )

    @property
    def type(self) -> Literal[ComponentType.user_select]: