Versions 2.0 - 2.0.4#
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.value
incorrectly rejecting strings of proper length.
Version 2.0.3#
- Add
View.message_id
. - Make usage of
__all__
consistent across the library. - Minor documentation fixes.
Version 2.0.2#
- Fix
Context.edit_response()
typehints. - Fix navigator attachments being kept between page changes.
Version 2.0.1#
- Unblock
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
, andModalContext
that inherit fromContext
. -
Added
miru.InteractionResponse
, an object representing responses sent out by the application to interactions. -
Context.respond()
andContext.edit_response()
now return anInteractionResponse
object. -
Added
Context.bot
andContext.author
as aliases forContext.app
andContext.user
respectively. -
Added overloads to
Context.defer()
to allow use of different deffered response-types. -
Added
miru.abc.ViewItem
andmiru.abc.ModalItem
that inherit frommiru.abc.Item
. -
Views now expect items of type
ViewItem
and provideViewContext
. -
Button
andSelect
are now subclasses ofViewItem
. -
Added
miru.abc.ItemHandler
.View
andModal
are subclasses of this object. -
Added
miru.abc.ItemHandler.last_context
to access the last received context & interaction by the item handler. -
miru.abc.ItemHandler
now 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
timeout
parameter toItemHandler.wait()
. -
Added
View.get_context()
andModal.get_context()
for custom context support. -
Added two new event types
ModalInteractionCreateEvent
andComponentInteractionCreateEvent
. -
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 theItemHandler
object to allow for method chaining. -
Added
responded
kwarg toNavigatorView
to have the ability to send navigators on acknowledged interactions. -
Added
start_at
kwarg toNavigatorView
to define what the first page should be. -
Added a "Jump to page" modal to built-in
ext.nav.IndicatorButton
when pressed. -
Allow passing
datetime.timedelta
toItemHandler.timeout
upon instantiation. -
Add
delete_after
toContext.respond()
as a kwarg, and as a method toInteractionResponse
. -
Added
miru.ext.nav.utils.Paginator
to 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_default
fields being ignored. -
Deprecate
miru.load
andmiru.unload
in favor ofmiru.install
andmiru.uninstall
.