Skip to content

Changelog#

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased#

1.19.1 - 2023-12-28#

Added#

  • Support for Python 3.12.

1.19.0 - 2023-08-30#

Added#

Changed#

  • The ephemeral default is now ignored for message update create initial response and defer calls. (This likely won't effect real world behaviour).

Fixed#

  • Explicitly passing ephemeral=False to create_initial_response or create_followup will now correctly override the client-level ephemeral default.
  • The component paginator will no-longer error out with a "Initial response has already been created" error when the jump to last page button tries to push the internal generator forwards only to find out it's depleted.

1.18.0 - 2023-08-23#

Added#

Changed#

Fixed#

1.17.0 - 2023-08-18#

Added#

  • Wait for implementation for modals.

Changed#

  • Page.__init__'s signature now more closely Hikari's message create methods: with new attachment and embed keyword arguments for passing singular values while also now allowing an embed or file to be passed as content.

Fixed#

  • Timed out individual requests will no-longer lead to the chunk tracker crashing.

1.16.0 - 2023-08-11#

Added#

  • yuyo.InteractionError error type which can be used to end modal and component interactions with a message.

Fixed#

1.15.0 - 2023-08-10#

Added#

1.14.2 - 2023-05-08#

Fixed#

  • The fields for a ModalOptions are now correctly tracked when added to a Modal instance and are no-longer erroneously tracked as static fields for type(modal).

1.14.1 - 2023-05-03#

Changed#

Removed#

1.14.0 - 2023-05-03#

Added#

Changed#

  • Message component custom IDs are now defaulted to a constant ID that's generated from the function's path (which includes the relevant module and class qualnames) when added using the as_ descriptors in yuyo.components.
  • The id_metadata field in components.ActionColumnExecutor.__init__ now also supports using a component callback's name in the class' namespace as the key (specifically when it was added using one of the as_ descriptors).
  • The auto-generated default UUID custom IDs now only consist of the UUID's hex (without any -), bringing the length down from 36 chars to 32.
  • The descriptors returned by the as_ decorators in yuyo.components are now hidden when accessed directly on classes. The decorated callback will now be directly exposed as the class attribute instead.

Fixed#

  • ActionColumnExecutor and Modal both now properly relay __init_subclass__ keyword arguments when being used in mixed inheritance.

Removed#

  • yuyo.components.with_static_interactive_button
  • yuyo.components.with_static_link_button
  • yuyo.components.with_static_select_menu
  • yuyo.components.with_static_channel_menu
  • yuyo.components.with_static_text_menu
  • The following deprecated functionality and aliases:
    • ActionRowExecutor in favour of the new action column executor.
    • Allowing callback to be passed as the first argument and type as the second argument for ActionColumnExecutor.add_select_menu, and ActionColumnExecutor.add_static_select_menu.
    • timeout keyword argument from ComponentExecutor.__init__, ActionColumnExecutor.__init__, and ComponentPaginator.__init__.
    • prefix_match keyword argument from Modal.add_static_text_input, Modal.add_text_input, modals.with_static_text_input, modals.with_text_input, and modals.text_input.
    • ComponentContext.select_channels
    • ComponentContext.select_roles
    • ComponentContext.select_texts
    • ComponentContext.select_users
    • ComponentContext.select_members
    • ComponentClient.set_constant_id
    • ComponentClient.get_constant_id
    • ComponentClient.remove_constant_id
    • ComponentClient.with_constant_id
    • ComponentClient.set_executor
    • ComponentClient.get_executor
    • ComponentClient.remove_executor
    • AbstractComponentExecutor.has_expired
    • AbstractComponentExecutor.timeout
    • ComponentExecutor.has_expired
    • ComponentExecutor.timeout
    • ActionColumnExecutor.timeout
    • ActionColumnExecutor.has_expired
    • ActionColumnExecutor.add_button
    • ActionColumnExecutor.add_interative_button
    • ActionColumnExecutor.add_static_button
    • ActionColumnExecutor.add_static_interative_button
    • ActionColumnExecutor.with_static_button
    • ActionColumnExecutor.with_static_interative_button
    • ActionColumnExecutor.with_static_select_menu
    • ActionColumnExecutor.add_channel_select
    • ActionColumnExecutor.add_static_channel_select
    • ActionColumnExecutor.with_static_channel_select
    • ActionColumnExecutor.add_text_select
    • ActionColumnExecutor.add_static_text_select
    • ComponentPaginator.builder
    • ComponentPaginator.add_row
    • components.with_static_button
    • components.with_static_interative_button
    • components.with_static_channel_select
    • InviteLink.fetch
    • InviteLink.get
    • MessageLink.fetch
    • MessageLink.get
    • TemplateLink.fetch
    • WebhookLink.fetch
    • modals.AbstractTimeout
    • modals.BasicTimeout
    • modals.NeverTimeout
    • ModalClient.set_modal
    • ModalClient.remove_modal
    • timeouts.BasicTimeout
    • yuyo.BasicTimeout

1.13.0a1 - 2023-04-25#

Added#

Changed#

Deprecated#

  • yuyo.components.ActionRowExecutor in favour of the action column executor.
  • ActionColumnExecutor.add_row.

Fixed#

  • reactions.Client now correctly points towards reactions.ReactionClient.
  • Some edge cases where the paginators were sending the current page in response to a reaction/interaction instead of giving a noop response or just not responding.

Removed#

1.12.0a1 - 2023-04-24#

Added#

Changed#

  • ActionColumnExecutor now allows overriding inherited component class descriptors.
  • The add_static methods on ActionColumnExecutor now override any previously added sub-component with the same match ID rather than append a duplicate entry.

Fixed#

1.11.2a1 - 2023-04-10#

Added#

  • Support for parsing message links to yuyo.links.

Changed#

Fixed#

  • ModalOptions attributes now correctly expose the values passed to the modal rather than internal descriptors.
  • ChunkTracker.set_auto_chunk_members now correctly disables auto chunking when False is passed after it has been previously enabled. This now also always changes the configuration for chunk_presences.
  • Some typoed function names which were missing the "c" in "interactive".
  • AsgiBot.start and AsgiBot.close will now call the startup and shutdown callbacks respectively when asgi_managed=False.

1.11.1a1 - 2023-04-05#

Changed#

Deprecated#

Fixed#

1.11.0a1 - 2023-04-02#

Added#

Changed#

  • Bumped the minimum Hikari version to 2.0.0.dev118. Some of the breaking component changes listed in Hikari's change log around the component builders effect Yuyo's component executors.
  • Prefix matching behaviour is now always enabled for both modals and components.
  • Message components now split by ":" for prefix matching like the modals client.
  • Marked most deprecated timeout class aliases using typing.deprecated. (only yuyo.modals.AbstractTimeout was skipped).
  • yuyo.components.WaitForExecutor now inherits from yuyo.components.WaitForExecutor and should also be passed to timeout=.
  • ActionColumnExecutor.rows now returns hikari.api.MessageActionRowBuilder.
  • Message components will now give a "timed-out" ephemeral initial response when ExecutorClosed is raised without any response.
  • The authors field is now optional (defaulting to public) for WaitForExecutor.__init__, ComponentPaginator.__init__, and ReactionPaginator.__init__.
  • Renamed yuyo.timeouts.BasicTimeout to yuyo.timeouts.SlidingTimeout.
  • Renamed ModalClient.set_modal to Modal.register_modal.
  • Renamed ModalClient.remove_modal to Modal.deregister_modal.
  • Renamed ComponentClient.get_executor to ComponentClient.get_executor_for_message.
  • Renamed ComponentClient.remove_executor to ComponentClient.deregister_message.
  • Renamed add_ and with_ component methods to better match Hikari's new naming scheme:
    • ActionRowExecutor.add_button to .add_interactive_button
    • ActionRowExecutor.add_channel_select to .add_channel_menu
    • ActionRowExecutor.add_text_select to .add_text_menu
    • ActionColumnExecutor.add_button to .add_interactive_button
    • ActionColumnExecutor.add_channel_select to .add_channel_menu
    • ActionColumnExecutor.add_text_select to .add_text_menu
    • ActionColumnExecutor.add_static_button to .add_static_interactive_button
    • ActionColumnExecutor.with_static_button to .with_static_interactive_button
    • ActionColumnExecutor.add_static_channel_select to .add_static_channel_menu
    • ActionColumnExecutor.with_static_channel_select to .with_static_channel_menu
    • ActionColumnExecutor.add_static_text_select to .add_static_text_menu
    • yuyo.components.with_static_button to .with_static_interactive_button
    • yuyo.components.with_static_channel_select to .with_static_channel_menu

Deprecated#

Removed#

  • yuyo.modals.NoDefault.

1.10.1a1 - 2023-03-25#

Added#

Changed#

  • A Modal text input's default will now also be used for value when value is left undefined and default is a string of <=4000 characters.
  • Increased the default timeout for modals to 2 minutes.

Fixed#

  • Text select menus will no-longer lead to an error being returned by Discord when max_values is greater then the count of its choices.

1.10.0a1 - 2023-03-20#

Added#

  • Support for declaring modal options in the modal callback's signature.

Changed#

  • Moved yuyo.modals.AbstractTimeout, yuyo.modals.BasicTimeout and yuyo.modals.NeverTimeout to new yuyo.timeouts module.

Deprecated#

  • yuyo.modals.AbstractTimeout, yuyo.modals.BasicTimeout and yuyo.modals.NeverTimeout as deprecated aliases

Fixed#

  • Modals now correctly default to a timeout duration of 10 seconds rather than 10 days.

Removed#

  • The deprecated yuyo.components.MultiComponentExecutor and yuyo.components.ChildActionRowExecutor types.
  • ActionRowExecutor.add_button can no-longer be used to add link buttons.
  • yuyo.modals.Modal subclasses will no-longer inherits fields.

1.9.1a1 - 2023-03-07#

Added#

Changed#

  • token_type now defaults to "Bot" when a string token is passed for AsgiBot.__init__.

Fixed#

  • yuyo.modals.modal and yuyo.modals.as_modal no-longer lead to Alluka's type-hint introspection raising an exception.
  • Handling of defaulting empty modal text inputs.
  • Add type property to yuyo.components.ActionRowExecutor and yuyo.components.ChildActionRowExecutor to fix compatibility with Hikari>=2.0.0.dev117.

1.9.0a1 - 2023-02-27#

Added#

Changed#

Fixed#

Removed#

  • Unnecessary entries from module __all__s (i.e. type hints, abstract classes, base classes and internal signal error classes).
  • Type variables are no-longer publicly exposed other than a couple callback types.

1.8.0a1.post1 - 2023-02-23#

Fixed#

  • The yuyo.components.ComponentPaginator will no-longer send a new message with "MESSAGE_UPDATE" as the content when the last entry button is pressed for the first time instead of marking it as loading.
  • The yuyo.components.ComponentPaginator will no-longer create a new message with "MESSAGE_UPDATE" as the content instead of giving a noop update response.

1.8.0a1 - 2023-02-23#

Added#

Changed#

Deprecated#

  • yuyo.components.MultiComponentExecutor and yuyo.components.ChildActionRowExecutor. yuyo.components.ActionColumnExecutor should be used instead.
  • Using ActionRowExecutor.add_button to add specifically link buttons. ActionRowExecutor.add_link_button should be used instead.

Fixed#

  • The add_{}_button methods on ComponentPaginator now ignore emoji when label is passed to avoid erroring when users don't explicitly unset the default for emoji.

Removed#

  • The AbstractReactionHandler.last_triggered and ReactionHandler.timeout properties as these were leaking impl detail.

1.7.0a1 - 2023-02-14#

Added#

  • Support for the new select menu types to yuyo.to_builder.
  • ActionRowExecutor.add_channel_select for adding channel select menus to an action row.
  • ActionRowExecutor.add_select_menu for adding the other new select menu types to an action row.
  • yuyo.pagination.Page type which can be used to represent a response page in the paginators. This allows configuring attachments and multiple embeds for a page.
  • Methods for manually setting the buttons for yuyo.components.ComponentPaginator and yuyo.reactions.ReactionPaginator which allow manually overriding the config for each button or reaction.

Changed#

Fixed#

  • Context.create_initial_response (and by extension Context.respond for the initial response specifically) will no-longer try to pass the attachment, component or embed as the actual message content when passed for the content argument for REST-based interaction commands.
  • BLACK_CROSS can now be passed to ComponentPaginator.__init__ and ReactionPaginator.__init__ in the triggers array to enable the stop button.
  • The configured executor is now used for handling attachments when creating the initial responses with the ASGI bot.
  • Check the headers before reading the body in the ASGI adapter and bot to avoid unnecessary hold up on bad requests.

Removed#

  • yuyo.InteractiveButtonBuilder/yuyo.components.InteractiveButtonBuilder and yuyo.SelectMenuBuilder/yuyo.components.SelectMenuBuilder. Hikari's default implementations should be used instead.
  • The deprecated load_from_attributes arguments and the relevant deprecated as_reaction_callback and as_component_callback functions.
  • The deprecated WaitForComponent alias of WaitForExecutor.

Security#

1.6.1a1 - 2023-01-17#

Changed#

Removed#

1.6.0a1 - 2023-01-12#

Added#

  • Helper functions for converting some Hikrai modals to builder objects in yuyo.to_builder. These support application commands and message components.

Changed#

  • Bumped minimum Hikari version to v2.0.0.dev114.

1.5.0a1 - 2023-01-10#

Added#

  • Add classes and functions for handling message, webhook, invite and template links.

Changed#

  • Officially drop support for Python 3.8.

1.4.0a1.post1 - 2022-11-20#

Changed#

Fixed#

  • yuyo.list_status.DiscordBotListService's logging when declaring per-shard stats.
  • Declare bot stats per-shard instead of for the whole bot when list status is using the standard cache or event strategies.

1.4.0a1 - 2022-11-20#

Added#

  • A system for automatically declaring a bot's guild count on the bot lists top.gg, bots.gg and discordbotlist.com. See yuyo.list_status for more information.
  • "asgi" feature flag for ensuring this installs with the dependencies required to run the Asgi REST bot adapter.

Changed#

Deprecated#

  • yuyo.components.as_child_executor, yuyo.components.as_component_callback, and yuyo.components.as_reaction_callback are no longer documented (included in their relevant module's __all__) as these are considered deprecated and undocumented.

Fixed#

  • yuyo.backoff.Backoff.backoff now respects the max retires config and finished flag. For this it will now return None without sleeping when either has been reached.

Removed#

1.3.1a1 - 2022-11-07#

Added#

  • A chunk request tracker implementation.

Changed#

This argument will be of type yuyo.asgi.AsgiAdapter when these methods are called of an asgi adapter and of type yuyo.asgi.AsgiBot when called on an asgi bot instance.

Removed#

1.2.1a1 - 2022-11-04#

Added#

Changed#

Fixed#

  • yuyo.components.BaseContext.respond trying to edit in the initial response instead of create a follow up if a deferred initial response was deleted.
  • Long running delete_after and component execution tasks will no-longer be cancelled by GC.

Removed#

  • The project metadata dunder attributes from yuyo. importlib.metadata should be used to get this metadata instead.

1.1.1a1 - 2022-08-28#

Added#

  • Support for sending attachments in the initial response to the ASGI server implementation.
  • Support for sending attachments on initial response to the ComponentContext.

Changed#

  • Bumped the minimum hikari version to dev109.
  • Async functions must be typed as returning typing.Coroutine/collections.abc.Coroutine rather than typing.Awaitable now.

Fixed#

  • Several bug fixes on handling context response tracking have been copied over from Tanjun to ComponentContext.

1.0.6a1 - 2022-05-24#

Changed#

  • Bumped the minimum hikari version to dev108.

Fixed#

  • WaitForExecutor now has better semantics/behaviour around being called when it's inactive:
    • Timeouts are now handled better meaning that a wait for executor timeout will mark it to be de-registered.
    • Execute calls to an executor that hasn't been waited for yet now return a not active message.

1.0.5a1.post1 - 2021-12-21#

Changed#

  • AsgiBot is now (by default) started and closed based on the ASGI lifespan events with the asgi_managed keyword argument to AsgiBot.__init__ allowing this to be disabled.

1.0.5a1 - 2021-12-21#

Added#

  • AsgiBot extension for AsgiAdapter which can be run by itself (manages a rest client).

Changed#

  • Renamed WaitForComponent to WaitForExecutor.

1.0.4a1 - 2021-11-22#

Added#

  • prefix_match option to ComponentClient custom ids to make storing metadata in custom ids possible.

Fixed#

  • custom id methods now raise ValueError on conflict rather than KeyError.

1.0.3a1 - 2021-10-27#

Added#

  • An ASGI/3 adapter for Hikari's interaction server.
  • Ability to register a callback for a constant custom_id in the component client. This takes precedence over any registered component executors.

Changed#

  • Renamed components.WaitFor to WaitForComponent and added it to components.__all__ and yuyo.__all__.

Fixed#

  • Context.defer is now used in the ComponentPaginator instead of Context.create_initial_response to defer the initial response since before deleting it as Context.create_initial_response errors in the REST flow when a defer type is passed.
  • Context.create_initial_response is no longer typed as taking deferred types.
  • Handling of authors in WaitForComponent.
  • Added timeout handling to the future returned by WaitForComponent.wait_for.

[1.0.2a1.post1] - 2021-10-02#

Fixed#

  • ComponentClient erroneously garbage collecting unexpired executors.
  • ComponentPaginator and ReactionPaginator both starting on index 1 instead of 0.

1.0.2a1 - 2021-10-02#

Added#

  • Option to have the ComponentClient be event managed when linked to an event manager. This is True by default.

Changed#

  • The client now gives a ephemeral timed out response when an unknown message is received.

Fixed#

  • ComponentClient's gc task not being started when its opened.
  • Handling of access errors in the component client.
  • MultiComponentExecutor slots.

1.0.1a1 - 2021-09-21#

Added#

  • Higher level component execution client and a pagination specific implementation of its executor.

Changed#

  • Totally refactored reaction pagination client to make it more abstract and abstracted away from pagination where the pagination is just a standard use case specific implementation of its executor.
  • Renamed module pagnation to pagination.
  • Move the reaction handling logic over to "reactions.py"
  • Renamed string_patinator functions to paginate_string

Fixed#

  • Iffy behaviour around "locking" the reaction executor which lead to some requests just being ignored.