diff --git a/src/imports/utils.py b/src/imports/utils.py index eaf63b9..2e7f283 100644 --- a/src/imports/utils.py +++ b/src/imports/utils.py @@ -296,14 +296,13 @@ class Book: discord.TextChannel, discord.ext.commands.Bot, discord.Message]) -> None: - if pag == Paginator(ctx.bot): - raise RuntimeError('Cannot create a book out of an empty Paginator.') - self._pages = pag.process_pages() self._len_pages = len(self._pages) self._current_page = 0 self._message, self._channel, self._bot, self._calling_message = ctx self._locked = True + if pag == Paginator(self._bot): + raise RuntimeError('Cannot create a book out of an empty Paginator.') def advance_page(self) -> None: self._current_page += 1