Skip to content

Screen Items API Reference#

ScreenItem #

ScreenItem(
    *,
    custom_id: str | None = None,
    row: int | None = None,
    position: int | None = None,
    disabled: bool = False,
    width: int = 1
)

Bases: miru.abc.ViewItem, abc.ABC

An abstract base for all screen items. Screen requires instances of this class as it's items.

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.

width property #

width: int

The item's width taken up in a Discord UI action row.

type abstractmethod property #

The component's underlying component type.

view property #

view: View

The view this item is attached to.

disabled property writable #

disabled: bool

Indicates whether the item is disabled or not.

menu property #

menu: Menu

The menu this item is attached to. This will be the same as view if the view is a menu.

screen property #

screen: Screen

The screen this item is attached to.

InteractiveScreenItem #

InteractiveScreenItem(
    *,
    custom_id: str | None = None,
    row: int | None = None,
    position: int | None = None,
    width: int = 1,
    disabled: bool = False,
    autodefer: (
        bool | AutodeferOptions | hikari.UndefinedType
    ) = hikari.UNDEFINED
)

Bases: miru.abc.InteractiveViewItem, ScreenItem

An abstract base for all interactive screen items.

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.

width property #

width: int

The item's width taken up in a Discord UI action row.

type abstractmethod property #

The component's underlying component type.

view property #

view: View

The view this item is attached to.

disabled property writable #

disabled: bool

Indicates whether the item is disabled or not.

menu property #

menu: Menu

The menu this item is attached to. This will be the same as view if the view is a menu.

screen property #

screen: Screen

The screen this item is attached to.

autodefer property #

Indicates whether the item should be deferred automatically. If left as UNDEFINED, the view's autodefer option will be used.

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: ViewContextT

ScreenLinkButton #

ScreenLinkButton(
    url: str,
    label: str | None = None,
    *,
    emoji: hikari.Emoji | str | None = None,
    disabled: bool = False,
    row: int | None = None,
    position: int | None = None
)

Bases: miru.LinkButton, ScreenItem

A base class for all screen link buttons.

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.

width property #

width: int

The item's width taken up in a Discord UI action row.

type property #

The component's underlying component type.

view property #

view: View

The view this item is attached to.

disabled property writable #

disabled: bool

Indicates whether the item is disabled or not.

menu property #

menu: Menu

The menu this item is attached to. This will be the same as view if the view is a menu.

screen property #

screen: Screen

The screen this item is attached to.

label property writable #

label: str | None

The button's label. This is the text visible on the button.

style property #

style: t.Literal[hikari.ButtonStyle.LINK]

The button's style.

emoji property writable #

emoji: hikari.Emoji | None

The emoji that should be visible on the button.

url property writable #

url: str

The URL of the button.

ScreenButton #

ScreenButton(
    label: str | None = None,
    *,
    emoji: hikari.Emoji | str | None = None,
    style: InteractiveButtonStylesT = hikari.ButtonStyle.PRIMARY,
    disabled: bool = False,
    custom_id: str | None = None,
    row: int | None = None,
    position: int | None = None,
    autodefer: (
        bool | AutodeferOptions | hikari.UndefinedType
    ) = hikari.UNDEFINED
)

Bases: miru.Button, InteractiveScreenItem

A base class for all screen buttons.

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.

width property #

width: int

The item's width taken up in a Discord UI action row.

type property #

The component's underlying component type.

view property #

view: View

The view this item is attached to.

disabled property writable #

disabled: bool

Indicates whether the item is disabled or not.

menu property #

menu: Menu

The menu this item is attached to. This will be the same as view if the view is a menu.

screen property #

screen: Screen

The screen this item is attached to.

autodefer property #

Indicates whether the item should be deferred automatically. If left as UNDEFINED, the view's autodefer option will be used.

label property writable #

label: str | None

The button's label. This is the text visible on the button.

style property writable #

The button's style.

emoji property writable #

emoji: hikari.Emoji | None

The emoji that should be visible on the button.

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: ViewContextT

ScreenTextSelect #

ScreenTextSelect(
    *,
    options: t.Sequence[
        hikari.SelectMenuOption | SelectOption
    ],
    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: miru.TextSelect, InteractiveScreenItem

A base class for all screen text selects.

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.

width property #

width: int

The item's width taken up in a Discord UI action row.

type property #

The component's underlying component type.

view property #

view: View

The view this item is attached to.

disabled property writable #

disabled: bool

Indicates whether the item is disabled or not.

menu property #

menu: Menu

The menu this item is attached to. This will be the same as view if the view is a menu.

screen property #

screen: Screen

The screen this item is attached to.

autodefer property #

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.

min_values property writable #

min_values: int

The minimum amount of options a user has to select.

max_values property writable #

max_values: int

The maximum amount of options a user is allowed to select.

options property writable #

The select menu's options.

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: ViewContextT

ScreenUserSelect #

ScreenUserSelect(
    *,
    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: miru.UserSelect, InteractiveScreenItem

A base class for all screen user selects.

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.

width property #

width: int

The item's width taken up in a Discord UI action row.

type property #

The component's underlying component type.

view property #

view: View

The view this item is attached to.

disabled property writable #

disabled: bool

Indicates whether the item is disabled or not.

menu property #

menu: Menu

The menu this item is attached to. This will be the same as view if the view is a menu.

screen property #

screen: Screen

The screen this item is attached to.

autodefer property #

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.

min_values property writable #

min_values: int

The minimum amount of options a user has to select.

max_values property writable #

max_values: int

The maximum amount of options a user is allowed to select.

values property #

values: t.Sequence[hikari.User]

The currently selected user objects. Some users may also be instances of hikari.InteractionMember, depending on how they were resolved.

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: ViewContextT

ScreenRoleSelect #

ScreenRoleSelect(
    *,
    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: miru.RoleSelect, InteractiveScreenItem

A base class for all screen role selects.

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.

width property #

width: int

The item's width taken up in a Discord UI action row.

type property #

The component's underlying component type.

view property #

view: View

The view this item is attached to.

disabled property writable #

disabled: bool

Indicates whether the item is disabled or not.

menu property #

menu: Menu

The menu this item is attached to. This will be the same as view if the view is a menu.

screen property #

screen: Screen

The screen this item is attached to.

autodefer property #

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.

min_values property writable #

min_values: int

The minimum amount of options a user has to select.

max_values property writable #

max_values: int

The maximum amount of options a user is allowed to select.

values property #

values: t.Sequence[hikari.Role]

The currently selected user objects.

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: ViewContextT

ScreenChannelSelect #

ScreenChannelSelect(
    *,
    channel_types: t.Sequence[hikari.ChannelType] = (
        hikari.ChannelType.GUILD_TEXT
    ),
    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: miru.ChannelSelect, InteractiveScreenItem

A base class for all screen channel selects.

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.

width property #

width: int

The item's width taken up in a Discord UI action row.

type property #

The component's underlying component type.

view property #

view: View

The view this item is attached to.

disabled property writable #

disabled: bool

Indicates whether the item is disabled or not.

menu property #

menu: Menu

The menu this item is attached to. This will be the same as view if the view is a menu.

screen property #

screen: Screen

The screen this item is attached to.

autodefer property #

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.

min_values property writable #

min_values: int

The minimum amount of options a user has to select.

max_values property writable #

max_values: int

The maximum amount of options a user is allowed to select.

channel_types property writable #

channel_types: t.Sequence[hikari.ChannelType]

The valid channel types that can be selected from the select menu.

values property #

The currently selected channels.

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: ViewContextT

ScreenMentionableSelect #

ScreenMentionableSelect(
    *,
    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: miru.MentionableSelect, InteractiveScreenItem

A base class for all screen mentionable selects.

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.

width property #

width: int

The item's width taken up in a Discord UI action row.

type property #

The component's underlying component type.

view property #

view: View

The view this item is attached to.

disabled property writable #

disabled: bool

Indicates whether the item is disabled or not.

menu property #

menu: Menu

The menu this item is attached to. This will be the same as view if the view is a menu.

screen property #

screen: Screen

The screen this item is attached to.

autodefer property #

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.

min_values property writable #

min_values: int

The minimum amount of options a user has to select.

max_values property writable #

max_values: int

The maximum amount of options a user is allowed to select.

values property #

values: hikari.ResolvedOptionData | None

The currently selected mentionable objects.

This is returned as a hikari.ResolvedOptionData object. You can access each type of mentionable object by using the following attributes:

  • values.users - All user objects selected
  • values.roles - All role objects selected
  • values.channels - All channel objects selected
  • values.members - All member objects selected

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: ViewContextT

DecoratedScreenItem #

DecoratedScreenItem(
    item_type: type[ScreenItemT],
    callback: t.Callable[
        [ScreenT, miru.ViewContext, ScreenItemT],
        t.Coroutine[t.Any, t.Any, None],
    ],
    **kwargs: t.Any
)

Bases: t.Generic[ScreenT, ScreenItemT]

A partial item made using a decorator.

name property #

name: str

The name of the callback this item decorates.

RETURNS DESCRIPTION
str

The name of the callback.

build #

build(screen: ScreenT) -> ScreenItemT

Convert a DecoratedScreenItem into a ViewItem.

PARAMETER DESCRIPTION
screen

The screen this decorated item is attached to.

TYPE: ScreenT

RETURNS DESCRIPTION
ScreenItemT

The converted item.

button #

button(
    *,
    label: str | None = None,
    custom_id: str | None = None,
    style: InteractiveButtonStylesT = hikari.ButtonStyle.PRIMARY,
    emoji: str | hikari.Emoji | None = None,
    row: int | None = None,
    disabled: bool = False,
    autodefer: (
        bool | miru.AutodeferOptions | hikari.UndefinedType
    ) = hikari.UNDEFINED
) -> t.Callable[
    [
        t.Callable[
            [ScreenT, miru.ViewContext, ScreenButton],
            t.Awaitable[None],
        ]
    ],
    DecoratedScreenItem[ScreenT, ScreenButton],
]

A decorator to transform a coroutine function into a Discord UI Button's callback. This must be inside a subclass of Screen.

PARAMETER DESCRIPTION
label

The button's label

TYPE: Optional[str] DEFAULT: None

custom_id

The button's custom ID

TYPE: Optional[str] DEFAULT: None

style

The style of the button

TYPE: hikari.ButtonStyle DEFAULT: hikari.ButtonStyle.PRIMARY

emoji

The emoji shown on the button

TYPE: Optional[Union[str, hikari.Emoji]] DEFAULT: None

row

The row the button should be in, leave as None for auto-placement.

TYPE: Optional[int] DEFAULT: None

disabled

A boolean determining if the button should be disabled or not

TYPE: bool DEFAULT: False

autodefer

The autodefer options for the button. If left UNDEFINED, the view's autodefer options will be used.

TYPE: bool | AutodeferOptions | hikari.UndefinedType DEFAULT: hikari.UNDEFINED

RETURNS DESCRIPTION
Callable[[Callable[[ScreenT, miru.ViewContext, ScreenButton], Awaitable[None]]], DecoratedScreenItem[ScreenT, ScreenButton]]

The decorated callback coroutine function.

RAISES DESCRIPTION
TypeError

If the decorated function is not a coroutine function.

channel_select #

channel_select(
    *,
    channel_types: t.Sequence[hikari.ChannelType] = (
        hikari.ChannelType.GUILD_TEXT
    ),
    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 | miru.AutodeferOptions | hikari.UndefinedType
    ) = hikari.UNDEFINED
) -> t.Callable[
    [
        t.Callable[
            [
                ScreenT,
                miru.ViewContext,
                ScreenChannelSelect,
            ],
            t.Awaitable[None],
        ]
    ],
    DecoratedScreenItem[ScreenT, ScreenChannelSelect],
]

A decorator to transform a function into a Discord UI ChannelSelectMenu's callback. This must be inside a subclass of Screen.

PARAMETER DESCRIPTION
channel_types

A sequence of channel types to filter the select menu by. Defaults to (hikari.ChannelType.GUILD_TEXT,).

TYPE: Sequence[hikari.ChannelType] DEFAULT: (hikari.ChannelType.GUILD_TEXT)

custom_id

The custom ID for the select menu. Defaults to None.

TYPE: Optional[str] DEFAULT: None

placeholder

The placeholder text for the channel select menu. Defaults to None.

TYPE: Optional[str] DEFAULT: None

min_values

The minimum number of values that can be selected. Defaults to 1.

TYPE: int DEFAULT: 1

max_values

The maximum number of values that can be selected. Defaults to 1.

TYPE: int DEFAULT: 1

disabled

Whether the channel select menu is disabled or not. Defaults to False.

TYPE: bool DEFAULT: False

row

The row the select should be in, leave as None for auto-placement.

TYPE: Optional[int] DEFAULT: None

autodefer

The autodefer options for the select menu. If left UNDEFINED, the view's autodefer options will be used.

TYPE: bool | AutodeferOptions | hikari.UndefinedType DEFAULT: hikari.UNDEFINED

RETURNS DESCRIPTION
Callable[[Callable[[ScreenT, ScreenChannelSelect, ViewContextT], Awaitable[None]]], DecoratedScreenItem[ScreenT, ScreenChannelSelect, ViewContextT]]

The decorated function.

RAISES DESCRIPTION
TypeError

If the decorated function is not a coroutine function.

mentionable_select #

mentionable_select(
    *,
    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 | miru.AutodeferOptions | hikari.UndefinedType
    ) = hikari.UNDEFINED
) -> t.Callable[
    [
        t.Callable[
            [
                ScreenT,
                miru.ViewContext,
                ScreenMentionableSelect,
            ],
            t.Awaitable[None],
        ]
    ],
    DecoratedScreenItem[ScreenT, ScreenMentionableSelect],
]

A decorator to transform a function into a Discord UI MentionableSelectMenu's callback. This must be inside a subclass of Screen.

PARAMETER DESCRIPTION
custom_id

The custom ID for the select menu

TYPE: Optional[str] DEFAULT: None

placeholder

The placeholder text to display when no option is selected

TYPE: Optional[str] DEFAULT: None

min_values

The minimum number of values that can be selected

TYPE: int DEFAULT: 1

max_values

The maximum number of values that can be selected

TYPE: int DEFAULT: 1

disabled

Whether the mentionable select menu is disabled

TYPE: bool DEFAULT: False

row

The row the select should be in, leave as None for auto-placement.

TYPE: Optional[int] DEFAULT: None

autodefer

The autodefer options for the select menu. If left UNDEFINED, the view's autodefer options will be used.

TYPE: bool | AutodeferOptions | hikari.UndefinedType DEFAULT: hikari.UNDEFINED

RETURNS DESCRIPTION
Callable[[Callable[[ScreenT, ScreenMentionableSelect, ViewContextT], Awaitable[None]]], DecoratedScreenItem[ScreenT, ScreenMentionableSelect, ViewContextT]]

The decorated function.

RAISES DESCRIPTION
TypeError

If the decorated function is not a coroutine function.

role_select #

role_select(
    *,
    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 | miru.AutodeferOptions | hikari.UndefinedType
    ) = hikari.UNDEFINED
) -> t.Callable[
    [
        t.Callable[
            [ScreenT, miru.ViewContext, ScreenRoleSelect],
            t.Awaitable[None],
        ]
    ],
    DecoratedScreenItem[ScreenT, ScreenRoleSelect],
]

A decorator to transform a function into a Discord UI RoleSelectMenu's callback. This must be inside a subclass of Screen.

PARAMETER DESCRIPTION
custom_id

The custom ID for the select menu

TYPE: Optional[str] DEFAULT: None

placeholder

The placeholder text to display when no roles are selected

TYPE: Optional[str] DEFAULT: None

min_values

The minimum number of roles that can be selected

TYPE: int DEFAULT: 1

max_values

The maximum number of roles that can be selected

TYPE: int DEFAULT: 1

disabled

Whether the select menu is disabled or not

TYPE: bool DEFAULT: False

row

The row number to place the select menu in

TYPE: Optional[int] DEFAULT: None

autodefer

The autodefer options for the select menu. If left UNDEFINED, the view's autodefer options will be used.

TYPE: bool | AutodeferOptions | hikari.UndefinedType DEFAULT: hikari.UNDEFINED

RETURNS DESCRIPTION
Callable[[Callable[[ScreenT, ScreenRoleSelect, ViewContextT], Awaitable[None]]], DecoratedScreenItem[ScreenT, ScreenRoleSelect, ViewContextT]]

The decorated function that serves as the callback for the select menu.

RAISES DESCRIPTION
TypeError

If the decorated function is not a coroutine function.

text_select #

text_select(
    *,
    options: t.Sequence[
        hikari.SelectMenuOption | miru.SelectOption
    ],
    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 | miru.AutodeferOptions | hikari.UndefinedType
    ) = hikari.UNDEFINED
) -> t.Callable[
    [
        t.Callable[
            [ScreenT, miru.ViewContext, ScreenTextSelect],
            t.Awaitable[None],
        ]
    ],
    DecoratedScreenItem[ScreenT, ScreenTextSelect],
]

A decorator to transform a function into a Discord UI TextSelectMenu's callback. This must be inside a subclass of Screen.

PARAMETER DESCRIPTION
options

The options to add to the select menu.

TYPE: Sequence[Union[hikari.SelectMenuOption, miru.SelectOption]]

custom_id

The custom ID for the select menu

TYPE: Optional[str] DEFAULT: None

placeholder

The placeholder text to display when no options are selected

TYPE: Optional[str] DEFAULT: None

min_values

The minimum number of options that can be selected

TYPE: int DEFAULT: 1

max_values

The maximum number of options that can be selected

TYPE: int DEFAULT: 1

disabled

Whether the select menu is disabled or not

TYPE: bool DEFAULT: False

row

The row number to place the select menu in

TYPE: Optional[int] DEFAULT: None

autodefer

The autodefer options for the select menu. If left UNDEFINED, the view's autodefer options will be used.

TYPE: bool | AutodeferOptions | hikari.UndefinedType DEFAULT: hikari.UNDEFINED

RETURNS DESCRIPTION
Callable[[Callable[[ScreenT, ScreenTextSelect, ViewContextT], Awaitable[None]]], DecoratedScreenItem[ScreenT, ScreenTextSelect, ViewContextT]]

The decorated function that serves as the callback for the select menu.

user_select #

user_select(
    *,
    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 | miru.AutodeferOptions | hikari.UndefinedType
    ) = hikari.UNDEFINED
) -> t.Callable[
    [
        t.Callable[
            [ScreenT, miru.ViewContext, ScreenUserSelect],
            t.Awaitable[None],
        ]
    ],
    DecoratedScreenItem[ScreenT, ScreenUserSelect],
]

A decorator to transform a function into a Discord UI UserSelectMenu's callback. This must be inside a subclass of Screen.

PARAMETER DESCRIPTION
custom_id

The custom ID for the select menu

TYPE: Optional[str] DEFAULT: None

placeholder

The placeholder text to display when no users are selected

TYPE: Optional[str] DEFAULT: None

min_values

The minimum number of users that can be selected

TYPE: int DEFAULT: 1

max_values

The maximum number of users that can be selected

TYPE: int DEFAULT: 1

disabled

Whether the select menu is disabled or not

TYPE: bool DEFAULT: False

row

The row number to place the select menu in

TYPE: Optional[int] DEFAULT: None

autodefer

The autodefer options for the select menu. If left UNDEFINED, the view's autodefer options will be used.

TYPE: bool | AutodeferOptions | hikari.UndefinedType DEFAULT: hikari.UNDEFINED

RETURNS DESCRIPTION
Callable[[Callable[[ScreenT, ScreenUserSelect, ViewContextT], Awaitable[None]]], DecoratedScreenItem[ScreenT, ScreenUserSelect, ViewContextT]]

The decorated function that serves as the callback for the select menu.