fix: choose() select path emits null label for emoji-only keys
add_option(label=label, ...) passed label=None straight through for an
emoji-only key (_split_key returns (None, emoji)), serializing
{"label": null, ...} which Discord's select-option schema rejects
(1-100 char label required). The <=5-option button path is unaffected
(a button may be emoji-only). Fall back to the key's own text form
(or a single space) as the label when _split_key yields none, so the
emoji is still shown via emoji= but the option always carries a
non-empty label.
Bump 0.1.1 -> 0.1.2.
Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
@@ -59,7 +59,9 @@ prompt stays live), disable their components after resolve/timeout, accept custo
|
||||
anywhere an emoji goes, and take `cleanup=True` to delete the prompt afterward. `choose`
|
||||
auto-switches to a select dropdown for more than 5 options or long labels, truncates select
|
||||
option labels and the placeholder to Discord's caps, and raises `ValueError` for more than 25
|
||||
options (Discord's per-select cap).
|
||||
options (Discord's per-select cap). An emoji-only key is label-less on the button path (a
|
||||
button may be emoji-only), but on the select path it gets a non-empty fallback label (the
|
||||
key's own text form) alongside its emoji, since Discord rejects a select option with no label.
|
||||
|
||||
## What's inside
|
||||
|
||||
|
||||
Reference in New Issue
Block a user