diff --git a/pyproject.toml b/pyproject.toml index b150884..b6222a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "dpy_paginator" -version = "0.1.0" +version = "0.1.1" description = "Button-navigated paginator for discord.py — config-free, injectable emojis, installable." requires-python = ">=3.10" dependencies = [ diff --git a/src/dpy_paginator/dpy_paginator.py b/src/dpy_paginator/dpy_paginator.py index 294ed0c..1335e88 100644 --- a/src/dpy_paginator/dpy_paginator.py +++ b/src/dpy_paginator/dpy_paginator.py @@ -159,6 +159,8 @@ class ButtonPaginator(Generic[PageT_co], discord.ui.View): cache_sleep: seconds to wait after priming before refreshing the view """ super().__init__(timeout=timeout) + if not pages: + raise ValueError("ButtonPaginator requires at least one page") self.author_id: Optional[int] = author_id self.delete_message_after: bool = delete_message_after self.mentions_allowed = mentions_allowed or discord.AllowedMentions.all()