Versions 4.0+#
These are all the changelogs for stable releases of hikari-miru (version 4.0.0 to present).
v4.2.0#
- Upgrade alluka to
0.3
. - Upgrade hikari to
2.0
. - Add Python 3.13 support.
- Message builders returned by
Menu
andNavigatorView
now try to setView.message
when issuing a response through them. - Fix
self.attr
referring to aDecoratedItem
instead of the item when using a decorator. - Fix message builders not passing through flags when using their respective response methods.
v4.1.1#
- Set
View.message
if ahikari.Message
is passed toClient.start_view()
'sbind_to=
.
v4.1.0#
- Add the ability to specify view items as classvars, similarly to modals
- Add the ability to pass the title to the modal as a class argument
- Fix
miru.ext.menu.Menu.build_response_async()
ignoring theephemeral=
kwarg. - Fix items created with decorators always having the same custom_ids, even when randomly generated.
- Fix
NavigatorView
default buttons being added whenitems=
is specified. - Remove accidental
typing_extensions
import inmiru.ext.nav
.
v4.0.0#
This is a major breaking release, adding REST bot support, dependency injection, removing global state from the library, and generally cleaning up old mistakes and weirdness that accumulated over the past 2 years.
Tip
If you already have an application that depends on v3 of miru, see the migration guide. Alternatively, you may keep using v3 if you do not have a need for the newly added features.
- BREAKING: Raised the minimum supported Python version to 3.10 or greater.
- BREAKING: Change all
@miru
decorators to takeContext
as their first argument and the item (button/select etc..) as their second. - BREAKING: Seperate link buttons out of
miru.Button
asmiru.LinkButton
. - BREAKING: Remove
miru.install()
. Usemiru.Client
instead. - BREAKING: Remove
View.start()
andModal.start()
. UseClient.start_view()
andClient.start_modal()
respectively instead. - BREAKING: Remove
NavigatorView.send()
. UseNavigatorView.build_response()
instead and send the builder. - BREAKING: Remove
Modal.send()
. UseModal.build_response()
instead and send the builder. - BREAKING: Remove
Menu.send()
. UseMenu.build_response()
instead and send the builder. - BREAKING: Remove
miru.ModalInteractionCreateEvent
andmiru.ComponentInteractionCreateEvent
. Use the unhandled interaction hooks instead. - BREAKING: Made
ViewItem.callback
only accept positional arguments. This is to allow renaming the context variable's name when overriding it in subclasses. This should not affect most people. - BREAKING: Move
miru.Context
tomiru.abc.Context
. - BREAKING: Move
miru.SelectBase
tomiru.abc.SelectBase
. -
DEPRECATION: Passing
buttons=
toext.nav.NavigatorView()
constructor. Use the newly addeditems=
instead. Thebuttons=
argument will be removed in v4.2.0. -
Add
miru.Client
. The client manages the state of all currently running views & modals & routes interactions to them. - Add RESTBot support. Simply pass a RESTBot to
miru.Client
when initializing it. - Add first-class support for dependency injection. This allows to better manage state across the library, along with adding better compatibility to
arc
andTanjun
viaClient.from_arc()
andClient.from_tanjun()
classmethods respectively. - Add the ability to configure
autodefer
at the item level for views. If an item does not specifyautodefer
, the view's setting will be used. - Add the ability to configure if the autodefer should be ephemeral, along with it's response type through
AutodeferOptions
. - Stabilize
Context.issued_response
. This property returns a boolean that isTrue
if the underlying interaction has already received an initial response. - Add response builders for entire responses from views or modals.
- Add
Context.respond_with_builder()
. - Add
@Client.set_unhandled_component_interaction_hook
and@Client.set_unhandled_modal_interaction_hook
. These are called when an interaction is received that is not handled by any running modal or view. - Add
miru.abc.InteractiveViewItem
for all view items that have callbacks. This includes all currentmiru.abc.ViewItem
exceptmiru.LinkButton
.