Example #1
0
 async def format_page(self, menu: MenuBase, entries):
     key = "(\u200b|\u200b)"
     offset = menu.current_page * self.per_page
     content = "`{no}. {prefix} {key} {b.count}`" if self.count_mode else "`{no}. {b} {key} {prefix}`"
     contents = [content.format(no=i+1, b=b, key=key, prefix=pprefix(menu.ctx.bot, b.prefix)) for i, b in enumerate(entries, start=offset)]
     embed = BaseEmbed(title="All Prefixes",
                       description="\n".join(realign(contents, key)))
     return menu.generate_page(embed, self._max_pages)
Example #2
0
 async def format_page(self, menu: MenuBase, entries):
     key = "(\u200b|\u200b)"
     offset = menu.current_page * self.per_page
     content = "`{no}. {b} {key} {b.count}`"
     contents = [content.format(no=i+1, b=b, key=key) for i, b in enumerate(entries, start=offset)]
     embed = BaseEmbed(title="Bot Command Rank",
                       description="\n".join(realign(contents, key)))
     return menu.generate_page(embed, self._max_pages)
Example #3
0
    async def format_page(self, menu: MenuBase, entries):
        offset = menu.current_page * self.per_page
        contents = ((f"{b.author}", f'**{b}** `{humanize.precisedelta(b.joined_at)}`')
                    for i, b in enumerate(entries, start=offset))

        embed = BaseEmbed(title="Bots added today")
        for n, v in contents:
            embed.add_field(name=n, value=v, inline=False)
        return menu.generate_page(embed, self._max_pages)