discord-ext-menus-views
discord-ext-menus-views copied to clipboard
change emojis
Hello. help meto change emojis in buttons
and change their order
class MySource(menus.ListPageSource):
def __init__(self, data):
super().__init__(data, per_page=20)
async def format_page(self, menu, data):
ctx = menu.ctx
embed = discord.Embed(description="\n".join(data), color=ctx.author.top_role.color, title=f"Tоп богачей на {ctx.guild.name}")
embed.set_footer(text=f"Страница {menu.current_page+1} из {menu._source.get_max_pages()} | Запросил: {ctx.author.display_name} ", icon_url=ctx.author.avatar.url)
return embed```
in command
pages = ViewMenuPages(source=MySource(data))
await pages.start(ctx)