Compare commits
2
Commits
438a15813f
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
654c18fece | ||
|
|
5095953257 |
+1
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "dpy_paginator"
|
name = "dpy_paginator"
|
||||||
version = "1.0.0"
|
version = "1.1.0"
|
||||||
description = "Button-navigated paginator for discord.py — config-free, injectable emojis, installable."
|
description = "Button-navigated paginator for discord.py — config-free, injectable emojis, installable."
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|||||||
@@ -385,8 +385,10 @@ class DPYPaginator(Generic[PageT_co], discord.ui.View):
|
|||||||
await self.message.edit(**kwargs)
|
await self.message.edit(**kwargs)
|
||||||
except (discord.NotFound, discord.Forbidden):
|
except (discord.NotFound, discord.Forbidden):
|
||||||
pass
|
pass
|
||||||
except discord.HTTPException:
|
except discord.HTTPException as exc:
|
||||||
log.warning("paginator cache_button: failed to refresh message", exc_info=True)
|
# swallowed best-effort cleanup that recovers - no traceback (exc_info belongs
|
||||||
|
# on terminal/unhandled paths); the reason is folded in for diagnosis.
|
||||||
|
log.warning("paginator cache_button: failed to refresh message: %s", exc)
|
||||||
|
|
||||||
@discord.ui.button(style=discord.ButtonStyle.blurple)
|
@discord.ui.button(style=discord.ButtonStyle.blurple)
|
||||||
async def next_page(self, interaction: Interaction, _: discord.ui.Button[Self]) -> None:
|
async def next_page(self, interaction: Interaction, _: discord.ui.Button[Self]) -> None:
|
||||||
@@ -464,9 +466,10 @@ class DPYPaginator(Generic[PageT_co], discord.ui.View):
|
|||||||
await self.message.delete()
|
await self.message.delete()
|
||||||
except (discord.NotFound, discord.Forbidden):
|
except (discord.NotFound, discord.Forbidden):
|
||||||
pass
|
pass
|
||||||
except discord.HTTPException:
|
except discord.HTTPException as exc:
|
||||||
# best-effort cleanup task; log rather than raise into an unretrieved task
|
# best-effort cleanup task; log rather than raise into an unretrieved task. no
|
||||||
log.warning("paginator on_timeout: failed to delete message", exc_info=True)
|
# traceback (exc_info belongs on terminal/unhandled paths) - fold the reason in.
|
||||||
|
log.warning("paginator on_timeout: failed to delete message: %s", exc)
|
||||||
|
|
||||||
|
|
||||||
# back-compat alias: the class was originally named ButtonPaginator; DPYPaginator is
|
# back-compat alias: the class was originally named ButtonPaginator; DPYPaginator is
|
||||||
|
|||||||
Reference in New Issue
Block a user