Navigation Items API Reference#

class miru.ext.nav.items.FirstButton(*, style: ~hikari.components.ButtonStyle = <ButtonStyle.PRIMARY: 1>, label: str | None = None, custom_id: str | None = None, emoji: ~hikari.emojis.Emoji | str | None = '⏪', row: int | None = None, position: int | None = None)[source]#

Bases: NavButton

A built-in NavButton to jump to first page.

async before_page_change() None[source]#

Called when the navigator is about to transition to the next page. Also called before the first page is sent.

async callback(context: ViewContextT) None[source]#

The component’s callback, gets called when the component receives an interaction.

Parameters:

context (ViewContextT) – The context, proxying the incoming interaction.

class miru.ext.nav.items.IndicatorButton(*, style: ~hikari.components.ButtonStyle = <ButtonStyle.SECONDARY: 2>, custom_id: str | None = None, emoji: ~hikari.emojis.Emoji | str | None = None, disabled: bool = False, row: int | None = None, position: int | None = None)[source]#

Bases: NavButton

A built-in NavButton to show the current page’s number.

async before_page_change() None[source]#

Called when the navigator is about to transition to the next page. Also called before the first page is sent.

async callback(context: ViewContextT) None[source]#

The component’s callback, gets called when the component receives an interaction.

Parameters:

context (ViewContextT) – The context, proxying the incoming interaction.

class miru.ext.nav.items.LastButton(*, style: ~hikari.components.ButtonStyle = <ButtonStyle.PRIMARY: 1>, label: str | None = None, custom_id: str | None = None, emoji: ~hikari.emojis.Emoji | str | None = '⏩', row: int | None = None, position: int | None = None)[source]#

Bases: NavButton

A built-in NavButton to jump to the last page.

async before_page_change() None[source]#

Called when the navigator is about to transition to the next page. Also called before the first page is sent.

async callback(context: ViewContextT) None[source]#

The component’s callback, gets called when the component receives an interaction.

Parameters:

context (ViewContextT) – The context, proxying the incoming interaction.

class miru.ext.nav.items.NavButton(*, style: ~hikari.components.ButtonStyle = <ButtonStyle.PRIMARY: 1>, label: str | None = None, disabled: bool = False, custom_id: str | None = None, url: str | None = None, emoji: ~hikari.emojis.Emoji | str | None = None, row: int | None = None, position: int | None = None)[source]#

Bases: Button, NavItem

A base class for all navigation buttons.

class miru.ext.nav.items.NavChannelSelect(*, channel_types: ~typing.Sequence[~hikari.channels.ChannelType] = (<ChannelType.GUILD_TEXT: 0>, ), custom_id: str | None = None, placeholder: str | None = None, min_values: int = 1, max_values: int = 1, disabled: bool = False, row: int | None = None)[source]#

Bases: ChannelSelect, NavItem

A base class for all navigation channel selects.

class miru.ext.nav.items.NavItem(*, custom_id: str | None = None, row: int | None = None, position: int | None = None, disabled: bool = False, width: int = 1)[source]#

Bases: ViewItem, ABC

A baseclass for all navigation items. NavigatorView requires instances of this class as it’s items.

async before_page_change() None[source]#

Called when the navigator is about to transition to the next page. Also called before the first page is sent.

property view: NavigatorView#

The view this item is attached to.

class miru.ext.nav.items.NavMentionableSelect(*, custom_id: str | None = None, placeholder: str | None = None, min_values: int = 1, max_values: int = 1, disabled: bool = False, row: int | None = None)[source]#

Bases: MentionableSelect, NavItem

A base class for all navigation mentionable selects.

class miru.ext.nav.items.NavRoleSelect(*, custom_id: str | None = None, placeholder: str | None = None, min_values: int = 1, max_values: int = 1, disabled: bool = False, row: int | None = None)[source]#

Bases: RoleSelect, NavItem

A base class for all navigation role selects.

class miru.ext.nav.items.NavTextSelect(*, options: Sequence[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)[source]#

Bases: TextSelect, NavItem

A base class for all navigation text selects.

class miru.ext.nav.items.NavUserSelect(*, custom_id: str | None = None, placeholder: str | None = None, min_values: int = 1, max_values: int = 1, disabled: bool = False, row: int | None = None)[source]#

Bases: UserSelect, NavItem

A base class for all navigation user selects.

class miru.ext.nav.items.NextButton(*, style: ~hikari.components.ButtonStyle = <ButtonStyle.PRIMARY: 1>, label: str | None = None, custom_id: str | None = None, emoji: ~hikari.emojis.Emoji | str | None = '▶', row: int | None = None, position: int | None = None)[source]#

Bases: NavButton

A built-in NavButton to jump to the next page.

async before_page_change() None[source]#

Called when the navigator is about to transition to the next page. Also called before the first page is sent.

async callback(context: ViewContextT) None[source]#

The component’s callback, gets called when the component receives an interaction.

Parameters:

context (ViewContextT) – The context, proxying the incoming interaction.

class miru.ext.nav.items.PrevButton(*, style: ~hikari.components.ButtonStyle = <ButtonStyle.PRIMARY: 1>, label: str | None = None, custom_id: str | None = None, emoji: ~hikari.emojis.Emoji | str | None = '◀', row: int | None = None, position: int | None = None)[source]#

Bases: NavButton

A built-in NavButton to jump to previous page.

async before_page_change() None[source]#

Called when the navigator is about to transition to the next page. Also called before the first page is sent.

async callback(context: ViewContextT) None[source]#

The component’s callback, gets called when the component receives an interaction.

Parameters:

context (ViewContextT) – The context, proxying the incoming interaction.

class miru.ext.nav.items.StopButton(*, style: ~hikari.components.ButtonStyle = <ButtonStyle.DANGER: 4>, label: str | None = None, custom_id: str | None = None, emoji: ~hikari.emojis.Emoji | str | None = '⏹', row: int | None = None, position: int | None = None)[source]#

Bases: NavButton

A built-in NavButton to stop the navigator and disable all buttons.

async callback(context: ViewContextT) None[source]#

The component’s callback, gets called when the component receives an interaction.

Parameters:

context (ViewContextT) – The context, proxying the incoming interaction.