Select ABC API Reference#
SelectBase
#
SelectBase(
*,
custom_id: str | None = None,
placeholder: str | None = None,
min_values: int = 1,
max_values: int = 1,
disabled: bool = False,
row: int | None = None,
autodefer: (
bool | AutodeferOptions | hikari.UndefinedType
) = hikari.UNDEFINED
)
Bases: InteractiveViewItem
, abc.ABC
A view component representing some type of select menu. All types of selects derive from this class.
PARAMETER | DESCRIPTION |
---|---|
custom_id |
The custom identifier of the select menu
TYPE:
|
placeholder |
Placeholder text displayed on the select menu
TYPE:
|
disabled |
A boolean determining if the select menu should be disabled or not
TYPE:
|
row |
The row the select menu should be in, leave as None for auto-placement.
TYPE:
|
autodefer |
The autodefer options for the select menu. If left
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ValueError
|
Exceeded the maximum of 25 select menu options possible. |
row
property
writable
#
row: int | None
The row the item should occupy. Leave as None for automatic placement.
position
property
writable
#
position: int | None
The position of the item within the row it occupies.
custom_id
property
writable
#
custom_id: str
The item's custom identifier. This will be used to track the item through interactions and is required for persistent views.
type
abstractmethod
property
#
type: hikari.ComponentType
The component's underlying component type.
autodefer
property
#
autodefer: AutodeferOptions | hikari.UndefinedType
Indicates whether the item should be deferred automatically.
If left as UNDEFINED
, the view's autodefer option will be used.
placeholder
property
writable
#
placeholder: str | None
The placeholder text that appears before the select menu is clicked.
max_values
property
writable
#
max_values: int
The maximum amount of options a user is allowed to select.
callback
async
#
callback(context: ViewContext) -> None
The component's callback, gets called when the component receives an interaction.
PARAMETER | DESCRIPTION |
---|---|
context |
The context, proxying the incoming interaction.
TYPE:
|