utils/pages.py
async def numbered_page(self, payload):
        """lets you type a page number to go to"""
        channel = self.message.channel
        author_id = payload.user_id
        to_delete = [await channel.send('What page do you want to go to?')]

        def message_check(m):
            return m.author.id == author_id and channel == m.channel and m.content.isdigit()

        try:
            msg = await self.bot.wait_for('message', check=message_check, timeout=30.0)
        except asyncio.TimeoutError:
            to_delete.append(await channel.send('Took too long.'))
            await asyncio.sleep(5)
        else:
            page = int(msg.content)
            to_delete.append(msg)
            await self.show_checked_page(page - 1)

        try:
            await channel.delete_messages(to_delete)
        except Exception:
            pass
lets you type a page number to go to
lets you type a page number to go to
lets you type a page number to go to
async def numbered_page(self, payload):
        channel = self.message.channel
        author_id = payload.user_id
        to_delete = [await channel.send('What page do you want to go to?')]
        def message_check(m):
            return m.author.id == author_id and channel == m.channel and m.content.isdigit()
        try:
            msg = await self.bot.wait_for('message', check=message_check, timeout=30.0)
        except asyncio.TimeoutError:
            to_delete.append(await channel.send('Took too long.'))
            await asyncio.sleep(5)
        else:
            page = int(msg.content)
            to_delete.append(msg)
            await self.show_checked_page(page - 1)
        try:
            await channel.delete_messages(to_delete)
        except Exception:
            pass
async def numbered_page ( self , payload ) : channel = self . message . channel author_id = payload . user_id to_delete = [ await channel . send ( 'What page do you want to go to?' ) ] def message_check ( m ) : return m . author . id == author_id and channel == m . channel and m . content . isdigit ( ) try : msg = await self . bot . wait_for ( 'message' , check = message_check , timeout = 30.0 ) except asyncio . TimeoutError : to_delete . append ( await channel . send ( 'Took too long.' ) ) await asyncio . sleep ( 5 ) else : page = int ( msg . content ) to_delete . append ( msg ) await self . show_checked_page ( page - 1 ) try : await channel . delete_messages ( to_delete ) except Exception : pass
lets you type a page number to go to
lets you type a page number to go to
"""lets you type a page number to go to"""
self
payload