Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(telegram): include restart in help text
Xubin Ren61f0923c66a1
diff --git a/nanobot/channels/telegram.py b/nanobot/channels/telegram.pyindex 9ffc20825..a5942dade 100644--- a/nanobot/channels/telegram.py+++ b/nanobot/channels/telegram.py@@ -453,6 +453,7 @@ class TelegramChannel(BaseChannel):"π nanobot commands:\n""/new β Start a new conversation\n""/stop β Stop the current task\n"+ "/restart β Restart the bot\n""/help β Show available commands")diff --git a/tests/test_telegram_channel.py b/tests/test_telegram_channel.pyindex 70feef5d4..c96f5e423 100644--- a/tests/test_telegram_channel.py+++ b/tests/test_telegram_channel.py@@ -597,3 +597,19 @@ async def test_forward_command_does_not_inject_reply_context() -> None:assert len(handled) == 1assert handled[0]["content"] == "/new"+++async def test_on_help_includes_restart_command() -> None:+ channel = TelegramChannel(+ TelegramConfig(enabled=True, token="123:abc", allow_from=["*"], group_policy="open"),+ MessageBus(),+ )+ update = _make_telegram_update(text="/help", chat_type="private")+ update.message.reply_text = AsyncMock()++ await channel._on_help(update, None)++ update.message.reply_text.assert_awaited_once()+ help_text = update.message.reply_text.await_args.args[0]+ assert "/restart" in help_text