update helps and commands (#1288)
This commit is contained in:
+64
-46
@@ -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 = [
|
||||||
("/setup", "commands.setup.description"),
|
("misc.help_group_admin", [
|
||||||
("/quick-log", "commands.quick_log.description"),
|
("/setup", "commands.setup.description"),
|
||||||
("/comp", "commands.comp.description"),
|
("/quick-log", "commands.quick_log.description"),
|
||||||
("/player-stats", "commands.player_stats.description"),
|
("/autolog-management", "commands.autolog_management.description"),
|
||||||
("/view-player-games", "commands.view_player_games.description"),
|
("/set-squadron", "commands.set_squadron.description"),
|
||||||
("/view-match", "commands.view_match.description"),
|
("/diagnose-perms", "commands.diagnose_perms.description"),
|
||||||
("/compare", "commands.compare.description"),
|
]),
|
||||||
("/leaderboard", "commands.leaderboard.description"),
|
("misc.help_group_squadron", [
|
||||||
("/top", "commands.top.description"),
|
("/sq-info", "commands.sq_info.description"),
|
||||||
("/set-squadron", "commands.set_squadron.description"),
|
("/sq-info-graph", "commands.sq_info_graph.description"),
|
||||||
("/sq-info", "commands.sq_info.description"),
|
("/sq-stats", "commands.sq_stats.description"),
|
||||||
("/sq-info-graph", "commands.sq_info_graph.description"),
|
("/sq-track", "commands.sq_track.description"),
|
||||||
("/sq-stats", "commands.sq_stats.description"),
|
("/sq-card", "commands.sq_card.description"),
|
||||||
("/sq-track", "commands.sq_track.description"),
|
("/comp", "commands.comp.description"),
|
||||||
("/loss-calculator", "commands.loss_calculator.description"),
|
("/vs", "commands.vs.description"),
|
||||||
("/autolog-management", "commands.autolog_management.description"),
|
("/recent", "commands.recent.description"),
|
||||||
("/diagnose-perms", "commands.diagnose_perms.description"),
|
]),
|
||||||
("/language", "commands.language.description"),
|
("misc.help_group_rankings", [
|
||||||
("/credits", "commands.credits.description"),
|
("/top", "commands.top.description"),
|
||||||
("/meta-management", "commands.meta_management.description"),
|
("/leaderboard", "commands.leaderboard.description"),
|
||||||
("/meta", "commands.meta.description"),
|
("/analytics", "commands.analytics.description"),
|
||||||
("/recent", "commands.recent.description"),
|
("/loss-calculator", "commands.loss_calculator.description"),
|
||||||
("/vs", "commands.vs.description"),
|
]),
|
||||||
("/schedule", "commands.schedule.description"),
|
("misc.help_group_players", [
|
||||||
("/website", "commands.website.description"),
|
("/player-stats", "commands.player_stats.description"),
|
||||||
("/unlock", "commands.unlock.description"),
|
("/view-player-games", "commands.view_player_games.description"),
|
||||||
("Translate Message", "commands.translate_message.name"),
|
("/view-match", "commands.view_match.description"),
|
||||||
("/stack-create", "commands.stack_create.description"),
|
("/compare", "commands.compare.description"),
|
||||||
("/stack-manage", "commands.stack_manage.description"),
|
("/card", "commands.card.description"),
|
||||||
("/news", "commands.news.description"),
|
("/set-player", "commands.set_player.description"),
|
||||||
("/donate", "commands.donate.description"),
|
]),
|
||||||
("/analytics", "commands.analytics.description"),
|
("misc.help_group_meta", [
|
||||||
("/sq-card", "commands.sq_card.description"),
|
("/meta-management", "commands.meta_management.description"),
|
||||||
("/card", "commands.card.description"),
|
("/meta", "commands.meta.description"),
|
||||||
("/bot-status", "commands.bot_status.description"),
|
]),
|
||||||
|
("misc.help_group_stacks", [
|
||||||
|
("/stack-create", "commands.stack_create.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"),
|
||||||
|
("/donate", "commands.donate.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
@@ -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.",
|
||||||
|
|||||||
Reference in New Issue
Block a user