update helps and commands (#1288)

This commit is contained in:
NotSoToothless
2026-05-30 09:09:29 -07:00
committed by GitHub
parent 54c06bd275
commit db34ca0d3d
2 changed files with 73 additions and 47 deletions
+49 -31
View File
@@ -8982,54 +8982,72 @@ async def help(interaction: discord.Interaction):
tos_link = "https://sre.pawjob.us/terms" tos_link = "https://sre.pawjob.us/terms"
lang = await guild_lang(interaction.guild.id) if interaction.guild else 'en' lang = await guild_lang(interaction.guild.id) if interaction.guild else 'en'
command_rows = [ command_groups = [
("misc.help_group_admin", [
("/setup", "commands.setup.description"), ("/setup", "commands.setup.description"),
("/quick-log", "commands.quick_log.description"), ("/quick-log", "commands.quick_log.description"),
("/comp", "commands.comp.description"), ("/autolog-management", "commands.autolog_management.description"),
("/player-stats", "commands.player_stats.description"),
("/view-player-games", "commands.view_player_games.description"),
("/view-match", "commands.view_match.description"),
("/compare", "commands.compare.description"),
("/leaderboard", "commands.leaderboard.description"),
("/top", "commands.top.description"),
("/set-squadron", "commands.set_squadron.description"), ("/set-squadron", "commands.set_squadron.description"),
("/diagnose-perms", "commands.diagnose_perms.description"),
]),
("misc.help_group_squadron", [
("/sq-info", "commands.sq_info.description"), ("/sq-info", "commands.sq_info.description"),
("/sq-info-graph", "commands.sq_info_graph.description"), ("/sq-info-graph", "commands.sq_info_graph.description"),
("/sq-stats", "commands.sq_stats.description"), ("/sq-stats", "commands.sq_stats.description"),
("/sq-track", "commands.sq_track.description"), ("/sq-track", "commands.sq_track.description"),
("/sq-card", "commands.sq_card.description"),
("/comp", "commands.comp.description"),
("/vs", "commands.vs.description"),
("/recent", "commands.recent.description"),
]),
("misc.help_group_rankings", [
("/top", "commands.top.description"),
("/leaderboard", "commands.leaderboard.description"),
("/analytics", "commands.analytics.description"),
("/loss-calculator", "commands.loss_calculator.description"), ("/loss-calculator", "commands.loss_calculator.description"),
("/autolog-management", "commands.autolog_management.description"), ]),
("/diagnose-perms", "commands.diagnose_perms.description"), ("misc.help_group_players", [
("/language", "commands.language.description"), ("/player-stats", "commands.player_stats.description"),
("/credits", "commands.credits.description"), ("/view-player-games", "commands.view_player_games.description"),
("/view-match", "commands.view_match.description"),
("/compare", "commands.compare.description"),
("/card", "commands.card.description"),
("/set-player", "commands.set_player.description"),
]),
("misc.help_group_meta", [
("/meta-management", "commands.meta_management.description"), ("/meta-management", "commands.meta_management.description"),
("/meta", "commands.meta.description"), ("/meta", "commands.meta.description"),
("/recent", "commands.recent.description"), ]),
("/vs", "commands.vs.description"), ("misc.help_group_stacks", [
("/schedule", "commands.schedule.description"),
("/website", "commands.website.description"),
("/unlock", "commands.unlock.description"),
("Translate Message", "commands.translate_message.name"),
("/stack-create", "commands.stack_create.description"), ("/stack-create", "commands.stack_create.description"),
("/stack-manage", "commands.stack_manage.description"), ("/stack-manage", "commands.stack_manage.description"),
]),
("misc.help_group_settings", [
("/language", "commands.language.description"),
("/schedule", "commands.schedule.description"),
("/website", "commands.website.description"),
("/credits", "commands.credits.description"),
("/news", "commands.news.description"), ("/news", "commands.news.description"),
("/donate", "commands.donate.description"), ("/donate", "commands.donate.description"),
("/analytics", "commands.analytics.description"),
("/sq-card", "commands.sq_card.description"),
("/card", "commands.card.description"),
("/bot-status", "commands.bot_status.description"), ("/bot-status", "commands.bot_status.description"),
("/unlock", "commands.unlock.description"),
("Translate Message", "misc.help_translate_hint"),
]),
] ]
guide_lines = [t(lang, "misc.help_commands_header")]
guide_lines.extend(
f"{idx}. **{name}** - {t(lang, key)}"
for idx, (name, key) in enumerate(command_rows, start=1)
)
guide_lines.append("")
guide_lines.append(t(lang, "misc.help_links", docs=documentation_link, support=support_server))
guide_lines.append(t(lang, "misc.help_terms", terms=tos_link))
guide_text = "\n".join(guide_lines)
embed = discord.Embed(title=t(lang, "misc.help_title"), description=guide_text, color=discord.Color.blue()) description = (
t(lang, "misc.help_links", docs=documentation_link, support=support_server)
+ "\n"
+ t(lang, "misc.help_terms", terms=tos_link)
)
embed = discord.Embed(
title=t(lang, "misc.help_title"),
description=description,
color=discord.Color.blue(),
)
for group_key, rows in command_groups:
value = "\n".join(f"`{name}` — {t(lang, key)}" for name, key in rows)
embed.add_field(name=t(lang, group_key), value=value, inline=False)
embed.set_footer(text=DEFAULT_FOOTER_CAT) embed.set_footer(text=DEFAULT_FOOTER_CAT)
await interaction.response.send_message(embed=embed, ephemeral=False) await interaction.response.send_message(embed=embed, ephemeral=False)
+9 -1
View File
@@ -589,7 +589,15 @@
"status_gaijin_slow": "⚠️ Gaijin servers slow", "status_gaijin_slow": "⚠️ Gaijin servers slow",
"help_commands_header": "**Commands Overview**", "help_commands_header": "**Commands Overview**",
"help_links": "For detailed information, read the documentation [here]({docs}) or get support [here]({support}).", "help_links": "For detailed information, read the documentation [here]({docs}) or get support [here]({support}).",
"help_terms": "[Terms of Service]({terms}) • [Privacy Policy]({terms})" "help_terms": "[Terms of Service]({terms}) • [Privacy Policy]({terms})",
"help_group_admin": "Getting started & admin",
"help_group_squadron": "Squadron info",
"help_group_rankings": "Rankings & tools",
"help_group_players": "Players",
"help_group_meta": "Meta",
"help_group_stacks": "Stacks",
"help_group_settings": "Settings & info",
"help_translate_hint": "Right-click a message → Apps to translate it"
}, },
"dev": { "dev": {
"restricted_dev_team": "This command is restricted to the dev team.", "restricted_dev_team": "This command is restricted to the dev team.",