diff --git a/gateway/run.py b/gateway/run.py index 7fc4da59f5e..45d8f6a7a8c 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -11998,13 +11998,24 @@ class GatewayRunner: self._save_voice_modes() if adapter: self._set_adapter_auto_tts_enabled(adapter, chat_id, enabled=True) - return t("gateway.voice.enabled_short") + toggle_line = t("gateway.voice.enabled_short") else: self._voice_mode[voice_key] = "off" self._save_voice_modes() if adapter: self._set_adapter_auto_tts_disabled(adapter, chat_id, disabled=True) - return t("gateway.voice.disabled_short") + toggle_line = t("gateway.voice.disabled_short") + # Bare /voice still toggles, but append an explainer so users + # discover the on/off/tts/status subcommands (and, on Discord, + # live voice-channel join/leave). The toggle result is shown + # first via the {toggle} placeholder. + supports_voice_channels = adapter is not None and hasattr( + adapter, "join_voice_channel" + ) + channels = ( + t("gateway.voice.help_channels") if supports_voice_channels else "" + ) + return t("gateway.voice.help", toggle=toggle_line, channels=channels) async def _handle_voice_channel_join(self, event: MessageEvent) -> str: """Join the user's current Discord voice channel.""" diff --git a/locales/af.yaml b/locales/af.yaml index 9cf3c81c499..bb3fae463ee 100644 --- a/locales/af.yaml +++ b/locales/af.yaml @@ -343,6 +343,8 @@ gateway: label_off: "Af (slegs teks)" label_voice_only: "Aan (stemantwoord op stemboodskappe)" label_all: "TTS (stemantwoord op alle boodskappe)" + help: "{toggle}\n\n**Hoe /voice werk**\n• `/voice on` — stemantwoord wanneer jy 'n stemboodskap stuur\n• `/voice tts` — stemantwoord op *elke* boodskap\n• `/voice off` — terug na slegs-teks antwoorde\n• `/voice status` — wys die huidige modus\n• `/voice` (geen argument) — wissel vinnig tussen aan en af{channels}" + help_channels: "\n\n**Lewendige stemkanale (Discord)**\n• Sluit eers by 'n stemkanaal aan, dan `/voice channel` — ek sluit aan, luister en praat my antwoorde\n• `/voice leave` — ontkoppel van die stemkanaal" yolo: disabled: "⚠️ YOLO-modus **AF** vir hierdie sessie — gevaarlike opdragte sal goedkeuring vereis." diff --git a/locales/de.yaml b/locales/de.yaml index c0a8efdd5fe..437a90a9476 100644 --- a/locales/de.yaml +++ b/locales/de.yaml @@ -343,6 +343,8 @@ gateway: label_off: "Aus (nur Text)" label_voice_only: "An (Sprachantwort auf Sprachnachrichten)" label_all: "TTS (Sprachantwort auf alle Nachrichten)" + help: "{toggle}\n\n**So funktioniert /voice**\n• `/voice on` — Sprachantwort, wenn du eine Sprachnachricht sendest\n• `/voice tts` — Sprachantwort auf *jede* Nachricht\n• `/voice off` — zurück zu reinen Textantworten\n• `/voice status` — aktuellen Modus anzeigen\n• `/voice` (ohne Argument) — schnelles Umschalten zwischen an und aus{channels}" + help_channels: "\n\n**Live-Sprachkanäle (Discord)**\n• Tritt zuerst einem Sprachkanal bei, dann `/voice channel` — ich trete bei, höre zu und spreche meine Antworten\n• `/voice leave` — vom Sprachkanal trennen" yolo: disabled: "⚠️ YOLO-Modus für diese Sitzung **AUS** — gefährliche Befehle benötigen eine Genehmigung." diff --git a/locales/en.yaml b/locales/en.yaml index a54cb7f14db..1516977ccb6 100644 --- a/locales/en.yaml +++ b/locales/en.yaml @@ -358,6 +358,8 @@ gateway: label_off: "Off (text only)" label_voice_only: "On (voice reply to voice messages)" label_all: "TTS (voice reply to all messages)" + help: "{toggle}\n\n**How /voice works**\n• `/voice on` — voice reply when you send a voice message\n• `/voice tts` — voice reply to *every* message\n• `/voice off` — back to text-only replies\n• `/voice status` — show the current mode\n• `/voice` (no argument) — quick toggle between on and off{channels}" + help_channels: "\n\n**Live voice channels (Discord)**\n• Join a voice channel first, then `/voice channel` — I'll join, listen, and speak my replies\n• `/voice leave` — disconnect from the voice channel" yolo: disabled: "⚠️ YOLO mode **OFF** for this session — dangerous commands will require approval." diff --git a/locales/es.yaml b/locales/es.yaml index 47b9c01d641..b22fc2ec429 100644 --- a/locales/es.yaml +++ b/locales/es.yaml @@ -343,6 +343,8 @@ gateway: label_off: "Desactivado (solo texto)" label_voice_only: "Activado (responder con voz a mensajes de voz)" label_all: "TTS (responder con voz a todos los mensajes)" + help: "{toggle}\n\n**Cómo funciona /voice**\n• `/voice on` — respuesta de voz cuando envías un mensaje de voz\n• `/voice tts` — respuesta de voz a *cada* mensaje\n• `/voice off` — volver a respuestas solo de texto\n• `/voice status` — mostrar el modo actual\n• `/voice` (sin argumento) — alternar rápido entre activado y desactivado{channels}" + help_channels: "\n\n**Canales de voz en vivo (Discord)**\n• Únete primero a un canal de voz, luego `/voice channel` — me uno, escucho y digo mis respuestas\n• `/voice leave` — desconectar del canal de voz" yolo: disabled: "⚠️ Modo YOLO **DESACTIVADO** en esta sesión — los comandos peligrosos requerirán aprobación." diff --git a/locales/fr.yaml b/locales/fr.yaml index b577c162218..8201df6c3f3 100644 --- a/locales/fr.yaml +++ b/locales/fr.yaml @@ -343,6 +343,8 @@ gateway: label_off: "Désactivé (texte seulement)" label_voice_only: "Activé (réponse vocale aux messages vocaux)" label_all: "TTS (réponse vocale à tous les messages)" + help: "{toggle}\n\n**Comment fonctionne /voice**\n• `/voice on` — réponse vocale quand vous envoyez un message vocal\n• `/voice tts` — réponse vocale à *chaque* message\n• `/voice off` — retour aux réponses texte uniquement\n• `/voice status` — afficher le mode actuel\n• `/voice` (sans argument) — bascule rapide entre activé et désactivé{channels}" + help_channels: "\n\n**Salons vocaux en direct (Discord)**\n• Rejoignez d'abord un salon vocal, puis `/voice channel` — je rejoins, j'écoute et je parle mes réponses\n• `/voice leave` — se déconnecter du salon vocal" yolo: disabled: "⚠️ Mode YOLO **DÉSACTIVÉ** pour cette session — les commandes dangereuses nécessiteront une approbation." diff --git a/locales/ga.yaml b/locales/ga.yaml index d20e4b27dc2..eaf957a2912 100644 --- a/locales/ga.yaml +++ b/locales/ga.yaml @@ -347,6 +347,8 @@ gateway: label_off: "As (téacs amháin)" label_voice_only: "Ar (freagra gutha do theachtaireachtaí gutha)" label_all: "TTS (freagra gutha do gach teachtaireacht)" + help: "{toggle}\n\n**Conas a oibríonn /voice**\n• `/voice on` — freagra gutha nuair a sheolann tú teachtaireacht gutha\n• `/voice tts` — freagra gutha do *gach* teachtaireacht\n• `/voice off` — ar ais go freagraí téacs amháin\n• `/voice status` — taispeáin an mód reatha\n• `/voice` (gan argóint) — scoránaigh go tapa idir air agus as{channels}" + help_channels: "\n\n**Cainéil gutha bheo (Discord)**\n• Téigh isteach i gcainéal gutha ar dtús, ansin `/voice channel` — téim isteach, éistim agus labhraím mo fhreagraí\n• `/voice leave` — dícheangail ón gcainéal gutha" yolo: disabled: "⚠️ Mód YOLO **AS** don seisiún seo — beidh cead de dhíth d'orduithe contúirteacha." diff --git a/locales/hu.yaml b/locales/hu.yaml index 6fa56967f4b..78b18ac1942 100644 --- a/locales/hu.yaml +++ b/locales/hu.yaml @@ -343,6 +343,8 @@ gateway: label_off: "Ki (csak szöveg)" label_voice_only: "Be (hangválasz hangüzenetekre)" label_all: "TTS (hangválasz minden üzenetre)" + help: "{toggle}\n\n**Hogyan működik a /voice**\n• `/voice on` — hangválasz, amikor hangüzenetet küldesz\n• `/voice tts` — hangválasz *minden* üzenetre\n• `/voice off` — vissza a csak szöveges válaszokhoz\n• `/voice status` — az aktuális mód megjelenítése\n• `/voice` (argumentum nélkül) — gyors váltás be és ki között{channels}" + help_channels: "\n\n**Élő hangcsatornák (Discord)**\n• Először lépj be egy hangcsatornába, majd `/voice channel` — csatlakozom, hallgatok és hangosan válaszolok\n• `/voice leave` — lecsatlakozás a hangcsatornáról" yolo: disabled: "⚠️ YOLO mód **KI** ebben a munkamenetben — a veszélyes parancsok jóváhagyást igényelnek." diff --git a/locales/it.yaml b/locales/it.yaml index 44a150f5f9e..89d4e0796bb 100644 --- a/locales/it.yaml +++ b/locales/it.yaml @@ -343,6 +343,8 @@ gateway: label_off: "Off (solo testo)" label_voice_only: "On (risposta vocale ai messaggi vocali)" label_all: "TTS (risposta vocale a tutti i messaggi)" + help: "{toggle}\n\n**Come funziona /voice**\n• `/voice on` — risposta vocale quando invii un messaggio vocale\n• `/voice tts` — risposta vocale a *ogni* messaggio\n• `/voice off` — torna alle risposte solo testo\n• `/voice status` — mostra la modalità attuale\n• `/voice` (senza argomento) — alterna rapidamente tra attivo e disattivo{channels}" + help_channels: "\n\n**Canali vocali dal vivo (Discord)**\n• Entra prima in un canale vocale, poi `/voice channel` — mi unisco, ascolto e parlo le mie risposte\n• `/voice leave` — disconnetti dal canale vocale" yolo: disabled: "⚠️ Modalità YOLO **OFF** per questa sessione — i comandi pericolosi richiederanno approvazione." diff --git a/locales/ja.yaml b/locales/ja.yaml index e9244f29c63..1758746df02 100644 --- a/locales/ja.yaml +++ b/locales/ja.yaml @@ -343,6 +343,8 @@ gateway: label_off: "オフ (テキストのみ)" label_voice_only: "オン (音声メッセージにのみ音声で返信)" label_all: "TTS (すべてのメッセージに音声で返信)" + help: "{toggle}\n\n**/voice の使い方**\n• `/voice on` — 音声メッセージを送ると音声で返信\n• `/voice tts` — *すべての*メッセージに音声で返信\n• `/voice off` — テキストのみの返信に戻す\n• `/voice status` — 現在のモードを表示\n• `/voice`(引数なし)— オンとオフをすばやく切り替え{channels}" + help_channels: "\n\n**ライブ音声チャンネル (Discord)**\n• 先に音声チャンネルに参加してから `/voice channel` — 参加して聞き取り、音声で返信します\n• `/voice leave` — 音声チャンネルから切断" yolo: disabled: "⚠️ このセッションの YOLO モードは **OFF** — 危険なコマンドには承認が必要です。" diff --git a/locales/ko.yaml b/locales/ko.yaml index 29d0e512184..19fbd28cb30 100644 --- a/locales/ko.yaml +++ b/locales/ko.yaml @@ -343,6 +343,8 @@ gateway: label_off: "꺼짐 (텍스트 전용)" label_voice_only: "켜짐 (음성 메시지에 음성으로 응답)" label_all: "TTS (모든 메시지에 음성으로 응답)" + help: "{toggle}\n\n**/voice 사용법**\n• `/voice on` — 음성 메시지를 보내면 음성으로 답변\n• `/voice tts` — *모든* 메시지에 음성으로 답변\n• `/voice off` — 텍스트 전용 답변으로 복귀\n• `/voice status` — 현재 모드 표시\n• `/voice` (인자 없음) — 켜기와 끄기를 빠르게 전환{channels}" + help_channels: "\n\n**라이브 음성 채널 (Discord)**\n• 먼저 음성 채널에 들어간 다음 `/voice channel` — 제가 참여해 듣고 음성으로 답변합니다\n• `/voice leave` — 음성 채널에서 연결 해제" yolo: disabled: "⚠️ 이 세션에서 YOLO 모드 **꺼짐** — 위험한 명령은 승인이 필요합니다." diff --git a/locales/pt.yaml b/locales/pt.yaml index 7e84b08989a..191ad1413ec 100644 --- a/locales/pt.yaml +++ b/locales/pt.yaml @@ -343,6 +343,8 @@ gateway: label_off: "Desativado (apenas texto)" label_voice_only: "Ativado (resposta de voz a mensagens de voz)" label_all: "TTS (resposta de voz a todas as mensagens)" + help: "{toggle}\n\n**Como funciona o /voice**\n• `/voice on` — resposta por voz quando envias uma mensagem de voz\n• `/voice tts` — resposta por voz a *todas* as mensagens\n• `/voice off` — voltar às respostas apenas em texto\n• `/voice status` — mostrar o modo atual\n• `/voice` (sem argumento) — alternar rapidamente entre ligado e desligado{channels}" + help_channels: "\n\n**Canais de voz ao vivo (Discord)**\n• Entra primeiro num canal de voz, depois `/voice channel` — eu entro, ouço e falo as minhas respostas\n• `/voice leave` — desligar do canal de voz" yolo: disabled: "⚠️ Modo YOLO **DESATIVADO** nesta sessão — comandos perigosos exigirão aprovação." diff --git a/locales/ru.yaml b/locales/ru.yaml index 99431991779..ce526d7b47f 100644 --- a/locales/ru.yaml +++ b/locales/ru.yaml @@ -343,6 +343,8 @@ gateway: label_off: "Выкл. (только текст)" label_voice_only: "Вкл. (голосовой ответ на голосовые сообщения)" label_all: "TTS (голосовой ответ на все сообщения)" + help: "{toggle}\n\n**Как работает /voice**\n• `/voice on` — голосовой ответ, когда вы отправляете голосовое сообщение\n• `/voice tts` — голосовой ответ на *каждое* сообщение\n• `/voice off` — вернуться к ответам только текстом\n• `/voice status` — показать текущий режим\n• `/voice` (без аргумента) — быстрое переключение между вкл и выкл{channels}" + help_channels: "\n\n**Живые голосовые каналы (Discord)**\n• Сначала зайдите в голосовой канал, затем `/voice channel` — я подключусь, буду слушать и отвечать голосом\n• `/voice leave` — отключиться от голосового канала" yolo: disabled: "⚠️ Режим YOLO для этого сеанса **ОТКЛЮЧЁН** — опасные команды потребуют одобрения." diff --git a/locales/tr.yaml b/locales/tr.yaml index b2793c41fa2..ecd23d8e977 100644 --- a/locales/tr.yaml +++ b/locales/tr.yaml @@ -343,6 +343,8 @@ gateway: label_off: "Kapalı (yalnızca metin)" label_voice_only: "Açık (sesli mesajlara sesli yanıt)" label_all: "TTS (tüm mesajlara sesli yanıt)" + help: "{toggle}\n\n**/voice nasıl çalışır**\n• `/voice on` — sesli mesaj gönderdiğinde sesli yanıt\n• `/voice tts` — *her* mesaja sesli yanıt\n• `/voice off` — yalnızca metin yanıtlarına dön\n• `/voice status` — geçerli modu göster\n• `/voice` (argümansız) — açık ve kapalı arasında hızlı geçiş{channels}" + help_channels: "\n\n**Canlı ses kanalları (Discord)**\n• Önce bir ses kanalına katıl, sonra `/voice channel` — katılırım, dinlerim ve yanıtlarımı sesli söylerim\n• `/voice leave` — ses kanalından ayrıl" yolo: disabled: "⚠️ Bu oturumda YOLO modu **KAPALI** — tehlikeli komutlar onay gerektirecek." diff --git a/locales/uk.yaml b/locales/uk.yaml index ebe324e64de..b564ec30545 100644 --- a/locales/uk.yaml +++ b/locales/uk.yaml @@ -343,6 +343,8 @@ gateway: label_off: "Вимкнено (лише текст)" label_voice_only: "Увімкнено (голосова відповідь на голосові повідомлення)" label_all: "TTS (голосова відповідь на всі повідомлення)" + help: "{toggle}\n\n**Як працює /voice**\n• `/voice on` — голосова відповідь, коли ви надсилаєте голосове повідомлення\n• `/voice tts` — голосова відповідь на *кожне* повідомлення\n• `/voice off` — повернутися до відповідей лише текстом\n• `/voice status` — показати поточний режим\n• `/voice` (без аргументу) — швидке перемикання між увімк і вимк{channels}" + help_channels: "\n\n**Живі голосові канали (Discord)**\n• Спершу зайдіть у голосовий канал, потім `/voice channel` — я підключуся, слухатиму й відповідатиму голосом\n• `/voice leave` — від'єднатися від голосового каналу" yolo: disabled: "⚠️ Режим YOLO для цього сеансу **ВИМКНЕНО** — небезпечні команди потребуватимуть схвалення." diff --git a/locales/zh-hant.yaml b/locales/zh-hant.yaml index 3eb33b5ef06..a2210d2c225 100644 --- a/locales/zh-hant.yaml +++ b/locales/zh-hant.yaml @@ -343,6 +343,8 @@ gateway: label_off: "關閉(僅文字)" label_voice_only: "開啟(僅對語音訊息進行語音回覆)" label_all: "TTS(對所有訊息進行語音回覆)" + help: "{toggle}\n\n**/voice 用法**\n• `/voice on` — 當你傳送語音訊息時以語音回覆\n• `/voice tts` — 對*每則*訊息都以語音回覆\n• `/voice off` — 恢復為純文字回覆\n• `/voice status` — 顯示目前模式\n• `/voice`(無參數)— 在開啟和關閉之間快速切換{channels}" + help_channels: "\n\n**即時語音頻道 (Discord)**\n• 先加入一個語音頻道,然後 `/voice channel` — 我會加入、聆聽並以語音回覆\n• `/voice leave` — 中斷語音頻道" yolo: disabled: "⚠️ 本工作階段 YOLO 模式 **已關閉** — 危險指令將需要批准。" diff --git a/locales/zh.yaml b/locales/zh.yaml index 63bf3c8b31d..896a958778f 100644 --- a/locales/zh.yaml +++ b/locales/zh.yaml @@ -343,6 +343,8 @@ gateway: label_off: "关闭(仅文本)" label_voice_only: "开启(仅对语音消息进行语音回复)" label_all: "TTS(对所有消息进行语音回复)" + help: "{toggle}\n\n**/voice 用法**\n• `/voice on` — 当你发送语音消息时用语音回复\n• `/voice tts` — 对*每条*消息都用语音回复\n• `/voice off` — 恢复为纯文本回复\n• `/voice status` — 显示当前模式\n• `/voice`(无参数)— 在开启和关闭之间快速切换{channels}" + help_channels: "\n\n**实时语音频道 (Discord)**\n• 先加入一个语音频道,然后 `/voice channel` — 我会加入、聆听并用语音回复\n• `/voice leave` — 断开语音频道" yolo: disabled: "⚠️ 本会话 YOLO 模式 **已关闭** — 危险命令将需要批准。"