|
27 | 27 |
|
28 | 28 | import inspect
|
29 | 29 | import os
|
| 30 | +import sys |
30 | 31 | from collections.abc import Sequence
|
31 | 32 | from typing import TYPE_CHECKING, Any, Callable, Generic, TypeVar
|
32 | 33 |
|
|
64 | 65 |
|
65 | 66 | ST = TypeVar("ST", bound=Snowflake | str, covariant=True, default=Any)
|
66 | 67 | else:
|
67 |
| - ST = TypeVar("ST", bound="Snowflake | str", covariant=True) |
| 68 | + if sys.version_info >= (3, 13): |
| 69 | + ST = TypeVar("ST", bound="Snowflake | str", covariant=True, default=Any) |
| 70 | + else: |
| 71 | + ST = TypeVar("ST", bound="Snowflake | str", covariant=True) |
68 | 72 |
|
69 | 73 | S = TypeVar("S", bound="Select")
|
70 | 74 | V = TypeVar("V", bound="View", covariant=True)
|
@@ -114,7 +118,7 @@ class Select(Generic[V, ST], Item[V]):
|
114 | 118 | A list of channel types that can be selected in this menu.
|
115 | 119 | Only valid for selects of type :attr:`discord.ComponentType.channel_select`.
|
116 | 120 | disabled: :class:`bool`
|
117 |
| - Whether the select is disabled or not. Only useable in views. Defaults to ``True`` in views. |
| 121 | + Whether the select is disabled or not. Only useable in views. Defaults to ``False`` in views. |
118 | 122 | row: Optional[:class:`int`]
|
119 | 123 | The relative row this select menu belongs to. A Discord component can only have 5
|
120 | 124 | rows. By default, items are arranged automatically into those 5 rows. If you'd
|
@@ -778,7 +782,7 @@ def select(
|
778 | 782 | default_values: Optional[Sequence[Union[:class:`discord.SelectDefaultValue`, :class:`discord.abc.Snowflake`]]]
|
779 | 783 | The default values of this select. Only applicable if :attr:`.select_type` is not :attr:`discord.ComponentType.string_select`.
|
780 | 784 |
|
781 |
| - This can be either :class:`discord.SelectDefaultValue` instances or models, which will be converted into :class:`discord.SelectDefaultvalue` |
| 785 | + This can be either :class:`discord.SelectDefaultValue` instances or models, which will be converted into :class:`discord.SelectDefaultValue` |
782 | 786 | instances.
|
783 | 787 |
|
784 | 788 | Below, is a table defining the model instance type and the default value type it will be mapped:
|
|
0 commit comments