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"
|
||||
lang = await guild_lang(interaction.guild.id) if interaction.guild else 'en'
|
||||
|
||||
command_rows = [
|
||||
("/setup", "commands.setup.description"),
|
||||
("/quick-log", "commands.quick_log.description"),
|
||||
("/comp", "commands.comp.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"),
|
||||
("/sq-info", "commands.sq_info.description"),
|
||||
("/sq-info-graph", "commands.sq_info_graph.description"),
|
||||
("/sq-stats", "commands.sq_stats.description"),
|
||||
("/sq-track", "commands.sq_track.description"),
|
||||
("/loss-calculator", "commands.loss_calculator.description"),
|
||||
("/autolog-management", "commands.autolog_management.description"),
|
||||
("/diagnose-perms", "commands.diagnose_perms.description"),
|
||||
("/language", "commands.language.description"),
|
||||
("/credits", "commands.credits.description"),
|
||||
("/meta-management", "commands.meta_management.description"),
|
||||
("/meta", "commands.meta.description"),
|
||||
("/recent", "commands.recent.description"),
|
||||
("/vs", "commands.vs.description"),
|
||||
("/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-manage", "commands.stack_manage.description"),
|
||||
("/news", "commands.news.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"),
|
||||
command_groups = [
|
||||
("misc.help_group_admin", [
|
||||
("/setup", "commands.setup.description"),
|
||||
("/quick-log", "commands.quick_log.description"),
|
||||
("/autolog-management", "commands.autolog_management.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-graph", "commands.sq_info_graph.description"),
|
||||
("/sq-stats", "commands.sq_stats.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"),
|
||||
]),
|
||||
("misc.help_group_players", [
|
||||
("/player-stats", "commands.player_stats.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", "commands.meta.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)
|
||||
|
||||
await interaction.response.send_message(embed=embed, ephemeral=False)
|
||||
|
||||
+9
-1
@@ -589,7 +589,15 @@
|
||||
"status_gaijin_slow": "⚠️ Gaijin servers slow",
|
||||
"help_commands_header": "**Commands Overview**",
|
||||
"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": {
|
||||
"restricted_dev_team": "This command is restricted to the dev team.",
|
||||
|
||||
Reference in New Issue
Block a user