Versions 2.0+ Changelog#
These are all the changelogs for stable releases of hikari-miru (version 2.0.0 to 2.0.4).
Version 2.0.4#
Fixed setter of
TextInput.valueincorrectly rejecting strings of proper length.
Version 2.0.3#
Added
View.message_id.Make usage of
__all__consistent across the library.Minor documentation fixes.
Version 2.0.2#
Fixed
Context.edit_response()typehints.Fixed navigator attachments being kept between page changes.
Version 2.0.1#
Unblocked
View.wait_for_input()whenView.stop()is called.
Version 2.0.0#
BREAKING:
View.start()is now asynchronous and needs to be awaited.BREAKING:
View.start_listener()has been removed. UseView.start()instead.Added support for modals via
miru.Modal.Added support for text input fields via
miru.TextInput.Added
RawComponentContext,RawModalContext,ViewContext, andModalContextthat inherit fromContext.Added
miru.InteractionResponse, an object representing responses sent out by the application to interactions.Context.respond()andContext.edit_response()now return anInteractionResponseobject.Added
Context.botandContext.authoras aliases forContext.appandContext.userrespectively.Added overloads to
Context.defer()to allow use of different deffered response-types.Added
miru.abc.ViewItemandmiru.abc.ModalItemthat inherit frommiru.abc.Item.Views now expect items of type
ViewItemand provideViewContext.ButtonandSelectare now subclasses ofViewItem.Added
miru.abc.ItemHandler.ViewandModalare subclasses of this object.Added
miru.abc.ItemHandler.last_contextto access the last received context & interaction by the item handler.miru.abc.ItemHandlernow implementsSequence[hikari.api.MessageActionRowBuilder], and thus can be treated as a sequence of action rows. This means that calling.build()on item handlers is no longer required.Removed
miru.Interaction.Added
View.from_message()classmethod to allow creation of views from message components.Added
View.wait_for_input()to wait for any component interaction relating to the view.Added
timeoutparameter toItemHandler.wait().Added
View.get_context()andModal.get_context()for custom context support.Added two new event types
ModalInteractionCreateEventandComponentInteractionCreateEvent.These listeners include the corresponding raw context with the event object, along with every field from
hikari.InteractionCreateEvent.ItemHandler.add_item(),ItemHandler.remove_item(), andItemHandler.clear_items()now return theItemHandlerobject to allow for method chaining.Added
respondedkwarg toNavigatorViewto have the ability to send navigators on acknowledged interactions.Added
start_atkwarg toNavigatorViewto define what the first page should be.Added a “Jump to page” modal to built-in
ext.nav.IndicatorButtonwhen pressed.Allow passing
datetime.timedeltatoItemHandler.timeoutupon instantiation.Add
delete_aftertoContext.respond()as a kwarg, and as a method toInteractionResponse.Added
miru.ext.nav.utils.Paginatorto help pagination of long strings.View.start()now accepts awaitables that returnhikari.Message, thus allowing it to function with custom objects that support this behaviour.Fixed selectoption
is_defaultfields being ignored.Deprecate
miru.loadandmiru.unloadin favor ofmiru.installandmiru.uninstall.