Skip to content

Commit

Permalink
feat(help.py): add category-specific emojis for help command options …
Browse files Browse the repository at this point in the history
…to enhance user experience and clarity
  • Loading branch information
kzndotsh committed Nov 20, 2024
1 parent 272223c commit 08bfd41
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tux/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,19 @@ async def _create_select_options(

select_options_data: list[tuple[str, Page]] = await asyncio.gather(*tasks)

for index, (cog_group, page) in enumerate(select_options_data, start=1):
select_options[discord.SelectOption(label=cog_group.capitalize(), emoji=f"{index}️⃣")] = [page]
category_emoji_map = {
"info": "🔍",
"moderation": "🛡",
"utility": "🔧",
"admin": "👑",
"fun": "🎉",
"levels": "📈",
"services": "🔌",
}

for cog_group, page in select_options_data:
emoji = category_emoji_map.get(cog_group, "❓")
select_options[discord.SelectOption(label=cog_group.capitalize(), emoji=emoji)] = [page]

return select_options

Expand Down

0 comments on commit 08bfd41

Please sign in to comment.