modules/utils/paginator.py
async def paginate(self):
        """Actually paginate the entries and
        run the interactive loop if necessary."""
        if not self.entries and not self.hide_no_results:
            return await self.channel.send('No results found.')

        first_page = self.show_page(1, first=True)
        if not self.paginating:
            await first_page
        else:
            self.bot.loop.create_task(first_page)

        while self.paginating:
            try:
                reaction, user = await self.bot.wait_for('reaction_add', check=self.react_check, timeout=120.0)
            except asyncio.TimeoutError:
                self.paginating = False
                # noinspection PyBroadException
                try:
                    await self.message.clear_reactions()
                except:
                    pass
                finally:
                    break

            # noinspection PyBroadException
            try:
                await self.message.remove_reaction(reaction, user)
            except:
                pass

            await self.match()
Actually paginate the entries and
        run the interactive loop if necessary.
Actually paginate the entries and
run the interactive loop if necessary.
Actually paginate the entries and run the interactive loop if necessary .
async def paginate(self):
        if not self.entries and not self.hide_no_results:
            return await self.channel.send('No results found.')
        first_page = self.show_page(1, first=True)
        if not self.paginating:
            await first_page
        else:
            self.bot.loop.create_task(first_page)
        while self.paginating:
            try:
                reaction, user = await self.bot.wait_for('reaction_add', check=self.react_check, timeout=120.0)
            except asyncio.TimeoutError:
                self.paginating = False
                try:
                    await self.message.clear_reactions()
                except:
                    pass
                finally:
                    break
            try:
                await self.message.remove_reaction(reaction, user)
            except:
                pass
            await self.match()
async def paginate ( self ) : if not self . entries and not self . hide_no_results : return await self . channel . send ( 'No results found.' ) first_page = self . show_page ( 1 , first = True ) if not self . paginating : await first_page else : self . bot . loop . create_task ( first_page ) while self . paginating : try : reaction , user = await self . bot . wait_for ( 'reaction_add' , check = self . react_check , timeout = 120.0 ) except asyncio . TimeoutError : self . paginating = False try : await self . message . clear_reactions ( ) except : pass finally : break try : await self . message . remove_reaction ( reaction , user ) except : pass await self . match ( )
Actually paginate the entries and
run the interactive loop if necessary.
Actually paginate the entries and run the interactive loop if necessary .
"""Actually paginate the entries and
        run the interactive loop if necessary.""" # noinspection PyBroadException # noinspection PyBroadException
self