Releases: Cursed-Solutions/Yuyo
Releases · Cursed-Solutions/Yuyo
v1.4.0a1.post1
1.4.0a1.post1 - 2022-11-20
Changed
CacheStrategy.__init__
now takes two arguments(hikari.api.Cache, hikari.ShardAware)
.
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.
v1.4.0a1
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
yuyo.backoff.Backoff
now increments the internal counter regardless of whetheryuyo.backoff.Backoff.set_next_backoff
has been called.yuyo.backoff.Backoff
now iterates over the retry counter ([int][]), starting at 0, rather than justNone
.yuyo.backoff.Backoff.backoff
now returns the current retry count asint
orNone
if it has reached max retries or the finished flag has been set.- Allow
None
to be passed forattachment
andattachments
to edit response methods. - Star imports are no-longer used on the top level (at
yuyo
) so only the attributes present inyuyo.__all__
can be accessed there now. yuyo.components.AbstractComponentExecutor
,yuyo.components.ChildActionRowExecutor
,InteractiveButtonBuilder
,yuyo.components.as_child_executor
,yuyo.components.as_component_callback
,yuyo.reactions.AbstractReactionHandler
, andyuyo.reactions.as_reaction_callback
are no longer included inyuyo.__all__
/exported top-level.
Deprecated
yuyo.components.as_child_executor
,yuyo.components.as_component_callback
, andyuyo.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 returnNone
without sleeping when either has been reached.
Removed
backoff
option fromyuyo.backoff.Backoff.backoff
to better match the aiter flow.
v1.3.1a1
1.3.1a1 - 2022-11-07
Added
- A chunk request tracker implementation.
Changed
-
Bumped the minimum Hikari version to
2.0.0.dev112
. -
yuyo.asgi.AsgiAdapter
's startup and shutdown callbacks now take 1 argument, must returnNone
and must be asynchronous to match the methods added toRESTBotAware
in https://github.com/hikari-py/hikari/releases/tag/2.0.0.dev112.This argument will be of type
yuyo.asgi.AsgiAdapter
when these methods are called of an asgi adapter and of typeyuyo.asgi.AsgiBot
when called on an asgi bot instance.
Removed
replace_attachments
argument from the relevant context edit response methods.
For more information see https://github.com/hikari-py/hikari/releases/tag/2.0.0.dev112.
v1.2.1a1
1.2.1a1 - 2022-11-04
Added
ephemeral
keyword-argument toComponentContext
'screate_initial_response
,create_follow_up
anddefer
methods as a shorthand for including1 << 6
in the passed flags.delete_after
option toComponentContext
response methods.expires_at
property toComponentContext
.- Support for dependency injection through Alluka to the reaction and component clients.
Changed
ComponentExecutor.execute
now takes a context object instead of interaction and future objects.yuyo.pagination.async_paginate_string
,yuyo.pagination.sync_paginate_string
andyuyo.pagination.paginate_string
now return an (async) iterator of thestr
pages rather than an iterator oftuple[str, int]
.
If you need page counts, useenumerate
oryuyo.pagination.aenumerate
.- (Async) iterables can now be passed to
yuyo.pagination.async_paginate_string
,yuyo.pagination.sync_paginate_string
andyuyo.pagination.paginate_string
instead of just iterators.
Fixed
ComponentContext.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.
v1.1.1a1
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 thantyping.Awaitable
now.
Fixed
- Several bug fixes on handling context response tracking have been copied over from Tanjun to
ComponentContext
.
v1.0.6a1
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.
v1.0.5a1.post1
1.0.5a1.post1 - 2021-12-21
Changed
AsgiBot
is now (by default) started and closed based on the ASGI lifespan events with theasgi_managed
keyword argument toAsgiBot.__init__
allowing this to be disabled.
v1.0.5a1
v1.0.4a1
v1.0.3a1
1.0.3a1
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
toWaitForComponent
and added it tocomponents.__all__
andyuyo.__all__
.
Fixed
Context.defer
is now used in the ComponentPaginator instead ofContext.create_initial_response
to defer the initial response since before deleting it asContext.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.