Update cron, dashboard, root +3 more (+1 ~11)

This commit is contained in:
2026-05-28 20:21:28 +00:00
parent e79bed7afe
commit 0ce8a5a04d
12 changed files with 217 additions and 51 deletions

View File

@@ -285,6 +285,23 @@ def register(tree: app_commands.CommandTree, bot: discord.Client) -> app_command
msg = f"Default voce setată {new_voice}. Va intra în vigoare la următorul /voice join."
await interaction.followup.send(msg, ephemeral=True)
@voice_group.command(name="stop", description="Oprește audio-ul curent (golește coada TTS)")
async def stop_audio(interaction: discord.Interaction) -> None:
await interaction.response.defer(ephemeral=True)
guild_id = interaction.guild.id if interaction.guild else None
session = _voice_sessions.get(guild_id) if guild_id is not None else None
if session is None or session.ttsq is None:
await interaction.followup.send("Nu sunt în voice.", ephemeral=True)
return
try:
session.ttsq.clear()
log.info("voice stop: TTS queue cleared by user %s", interaction.user)
except Exception as e:
log.warning("voice stop: ttsq.clear failed: %s", e)
await interaction.followup.send(f"Eroare la oprire: {e}", ephemeral=True)
return
await interaction.followup.send("Audio oprit.", ephemeral=True)
@voice_group.command(name="doctor", description="Verifică voice stack")
async def doctor(interaction: discord.Interaction) -> None:
await interaction.response.defer(ephemeral=True)