ttstoy: cleaner accessibility voice list with current-voice marker

This commit is contained in:
2026-10-19 00:19:14 -05:00
parent 2a6278dd79
commit 27001a8246
+11 -5
View File
@@ -2151,12 +2151,18 @@ class TtsToy(Cog):
if voice is None:
current = self._access_voice_for(ctx.guild.id, ctx.author.id, engine)
current_label = self._access_voice_label(engine, current)
listing = ", ".join(f"`{self._access_voice_label(engine, v)}`" for v in pool)
lines = []
for v in pool:
lbl = self._access_voice_label(engine, v)
marker = ">" if v == current else " "
lines.append(f"{marker} {lbl}")
block = "\n".join(lines)
return await ctx.send(
f"Engine `{engine}`. Your voice: `{current_label}`.\n"
f"Available: {listing}\n"
f"Set with `{ctx.clean_prefix}ttstoy accessibility voice <name>` "
f"(or `auto` to be auto-assigned)."
f"**Accessibility voices** (engine: `{engine}`)\n"
f"Your voice: `{current_label}` (marked with `>` below)\n"
f"```\n{block}\n```\n"
f"Set yours: `{ctx.clean_prefix}ttstoy accessibility voice <name>` "
f"(or `auto`)"
)
choice = voice.strip()