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: handle /help command directly in Telegram, bypassing ACL check
Nikolas de Hor33d760d31213
diff --git a/nanobot/channels/telegram.py b/nanobot/channels/telegram.pyindex 39924b34a..fa48fefdd 100644--- a/nanobot/channels/telegram.py+++ b/nanobot/channels/telegram.py@@ -146,7 +146,7 @@ class TelegramChannel(BaseChannel):# Add command handlersself._app.add_handler(CommandHandler("start", self._on_start))self._app.add_handler(CommandHandler("new", self._forward_command))- self._app.add_handler(CommandHandler("help", self._forward_command))+ self._app.add_handler(CommandHandler("help", self._on_help))# Add message handler for text, photos, voice, documentsself._app.add_handler(@@ -258,14 +258,28 @@ class TelegramChannel(BaseChannel):"""Handle /start command."""if not update.message or not update.effective_user:return-+user = update.effective_userawait update.message.reply_text(f"π Hi {user.first_name}! I'm nanobot.\n\n""Send me a message and I'll respond!\n""Type /help to see available commands.")-++ async def _on_help(self, update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:+ """Handle /help command directly, bypassing access control.++ /help is informational and should be accessible to all users,+ even those not in the allowFrom list.+ """+ if not update.message:+ return+ await update.message.reply_text(+ "π nanobot commands:\n"+ "/new β Start a new conversation\n"+ "/help β Show available commands"+ )+@staticmethoddef _sender_id(user) -> str:"""Build sender_id with username for allowlist matching."""