Repository navigation
v3.14.1
This patch (which is honestly more of an actual release) makes the ephemeral Continue button hand its panel over reliably and gives every view one timeout rule, whichever way it was sent. It also adds StateStore.unsubscribe(), a public safe_defer(), and a source field on REGISTRY_PRUNED.
Added
StateStore.unsubscribe(subscriber_id). The missing counterpart tosubscribe(). A view's own id raisesValueError.safe_defer(interaction). The public name for the helper the guides taught as_safe_defer(), which keeps working with aDeprecationWarninguntil 4.0.0.REGISTRY_PRUNEDnames the call that pruned in a newsourcefield:"reattach","prune_unreachable", or"prune_registry".
Changed
- A view's timeout counts from its last click or its last landed post or edit, whichever way the view was sent. A card with nothing to click no longer stays registered for good. One meant to stay up between edits sets
timeout=None. - The unreachable sweep and a reattach pass report a deleted panel as
reason="gone". A subscriber that acted on"unreachable"or"explicit"for those removals handles"gone"as well. - A render that finds its view closed returns
RenderOutcome.CLOSED.NO_MESSAGEnow means only a message deleted out from under the view, so code comparing withNO_MESSAGEneedsCLOSEDtoo. - A render after a select pick ships even when the tree is unchanged, so a pick the callback refused no longer stays in the dropdown. A select whose options mark no
defaultshows its placeholder again.
Fixed
- The Continue button hands its panel over reliably. The replacement no longer arrives frozen, an error after it posts no longer stops the hand-over, attached views and participants move with it, and it works with
instance_limitandauto_register_participants. Arefresh()from your own code after the button appears no longer covers it. - A tab, wizard step, or page still loading when its view closed shows what it loaded, and a cursor paginator's overtaken page turn shows only a page it loaded.
- A failed push or pop puts the view back on its message without covering what the view sent while the push was stalled.
- A confirm prompt takes one answer, and a stateful button or select works in a plain discord.py view.
- Persistent panels: an
on_bindoverride that skipssuper()keeps its bot at send, and a restore that fails after attaching no longer leaves its buttons running on a dropped view. - Shutdown:
connect()on a bot discord.py has closed no longer reopens persistence, and aRuntimeErroryour own code raises while the bot closes logs as an error rather than at DEBUG.
Documentation
Install
pip install pycascadeui==3.14.1
See the full CHANGELOG for every change in this release.
Full Changelog: v3.14.0...v3.14.1