Add Discord voice notifications and admin setup with non-blocking Telegram chat tracking#19
Open
Anatolt wants to merge 2 commits into
Open
Add Discord voice notifications and admin setup with non-blocking Telegram chat tracking#19Anatolt wants to merge 2 commits into
Anatolt wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
/setflow,/show_discord_chats,/show_tg_chats,/admin_help).Description
services/memory.pyдляtelegram_chats,discord_voice_channelsиnotification_settings, а также методыupsert_telegram_chat,get_telegram_chats,upsert_discord_voice_channel,get_discord_voice_channels,set_voice_notification_chat_idиget_voice_notification_chat_id.handlers/chat_tracking.pyи зарегистрирован вtbot.pyкак неблокирующийMessageHandler(filters.ALL, track_chat, block=False)в низком приоритете (group=-1), чтобы лишь записывать метаданные чатов и не перехватывать команды.handlers/commands.py:admin_help,setflow,show_discord_chats,show_tg_chats, а также форматирование списков чатов и проверка прав через_is_admin_user; вhandlers/messages.pyдобавлены текстовые триггерыпокажи чаты дискорд/покажи чаты тг.discord_bot.pyреализована синхронизация метаданных голосовых каналов наon_readyи обработкаon_voice_state_updateдля детекции входов в каналы с отправкой уведомлений в Telegram черезtelegram.Botна чат, выбранный через/setflow.utils/console_tester.pyдля проверки новых админских команд и сценариев (админский контекст, seed данных для чатов/каналов).Testing
python utils/console_tester.py --run-command-testsи проверены ответы основных и новых админских команд; тесты прошли успешно./start,/new,/clear,/admin,/help,/admin_help,/models*,/consilium,/show_discord_chats,/show_tg_chats,/setflow,/routing_*и вернул ожидаемые ответы.block=False,group=-1), чтобы предотвратить конфликт с существующими обработчиками и восстановить отклик бота на сообщения и слеш‑команды.Codex Task