update helps and commands (#1288)

This commit is contained in:
NotSoToothless
2026-05-30 09:09:29 -07:00
committed by GitHub
parent 7edc0202f4
commit c69478166b
3 changed files with 19 additions and 52 deletions
+1 -23
View File
@@ -150,27 +150,6 @@ class TssCommands(commands.Cog):
f"✅ Logging **{name}**'s matches to <#{interaction.channel_id}>.", ephemeral=True
)
# ── /log-player ────────────────────────────────────────────────────────
@app_commands.command(name="log-player", description="Send a player's matches to this channel")
@app_commands.describe(player="Player username")
@app_commands.autocomplete(player=player_autocomplete)
@app_commands.checks.has_permissions(manage_guild=True)
@not_blacklisted()
async def log_player(self, interaction: discord.Interaction, player: str):
await interaction.response.defer(ephemeral=True)
if interaction.guild_id is None or interaction.channel_id is None:
return await interaction.followup.send("This command must be used in a server channel.", ephemeral=True)
candidates = await storage.resolve_players(player)
if not candidates:
return await interaction.followup.send(f"No players found matching **{player}**.", ephemeral=True)
if len(candidates) > 1:
return await interaction.followup.send(_too_many_msg(candidates), ephemeral=True)
uid, nick = str(candidates[0]["uid"]), candidates[0]["nick"]
preferences.upsert_log_entry(interaction.guild_id, uid, "tss-player", nick, interaction.channel_id)
await interaction.followup.send(
f"✅ Logging **{nick}**'s matches to <#{interaction.channel_id}>.", ephemeral=True
)
# ── /set-player ────────────────────────────────────────────────────────
@app_commands.command(name="set-player", description="Link your Discord account to a War Thunder player")
@app_commands.describe(player="Player username")
@@ -311,8 +290,7 @@ class TssCommands(commands.Cog):
name="Autologging — Manage Server",
value=(
"`/set-team <team>` — set this server's team\n"
"`/log-team <team>` — post a team's matches to this channel\n"
"`/log-player <player>` — post a player's matches to this channel"
"`/log-team <team>` — post a team's matches to this channel"
),
inline=False,
)