fix: skip a None content value in a multi-entry page join instead of rendering literal 'None'
the multi-entry content-join f-strung a dict entry's content with no None guard, so a
{'content': None} entry following a text entry produced a literal 'None' line
('hello' + None -> 'hello\nNone'). a None content now contributes nothing to the join.
Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
@@ -280,6 +280,8 @@ class DPYPaginator(Generic[PageT_co], discord.ui.View):
|
||||
f"page key {key!r} has unexpected type {type(value).__name__}"
|
||||
)
|
||||
elif key == "content":
|
||||
if value is None:
|
||||
continue
|
||||
existing = kwargs["content"]
|
||||
kwargs["content"] = value if existing is None else f"{existing}\n{value}"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user