async def on_questionmark(self, payload): embed = CustomEmbed( title="Help Info", description=( "```diff\n" "- <arg> Required \n" "- [arg] Optional \n" "- [arg..] Multiple Args\n" "```\n" ), ) embed.add_field( name="What do the emojis do?", value=( f"{EMOJIS['arrow_left']} - Goes one page backward.\n" f"{EMOJIS['double_backward']} - Goes to the first page.\n" f"{EMOJIS['stop']} - Stops the menu.\n" f"{EMOJIS['double_forward']} - Goes to the last page.\n" f"{EMOJIS['arrow_right']} - Goes one page forward\n" f"{EMOJIS['information']} - Shows this page.\n" ), ) if self.source.get_max_pages() == 1: embed.set_footer(text="To get back to the page, use the double arrows.") await self.message.edit(embed=embed)
def format_page(self, menu, entries): offset = menu.current_page * self.per_page embed = CustomEmbed( title="Help", description=( f"Use `{self.prefix}help[command]` for more info on a command.\n" f"You can also use `{self.prefix}help[category]` for more info on a category.\n" ), ) for index, category in enumerate(entries, start=offset): cate = list(category.keys())[0] category_name = getattr(cate, "qualified_name", "None") commands = category.get(list(category.keys())[0]) embed.add_field( name=f"**{category_name}** [{' | '.join(alias for alias in cate.aliases)}]" if getattr(cate, "aliases", None) is not None else f"**{category_name}**", value=f"{getattr(cate, 'description', '')}" + "\n" + " ".join(f"`{command.qualified_name}`" for command in commands) or "`None`", inline=False, ) embed.set_footer( text=f"Page {menu.current_page + 1} / {self.get_max_pages()}" if self.get_max_pages() > 0 else "Page 0/0" ) return embed