From 98b71829cc4b56c54f25c7f6b0b2d8c58a6966cb Mon Sep 17 00:00:00 2001 From: Mikkel Georgsen Date: Fri, 16 Jan 2026 18:16:33 +0000 Subject: [PATCH] feat(02-02): create commands.py with /help and /start handlers Co-Authored-By: Claude Opus 4.5 --- src/moai/bot/handlers/commands.py | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/moai/bot/handlers/commands.py diff --git a/src/moai/bot/handlers/commands.py b/src/moai/bot/handlers/commands.py new file mode 100644 index 0000000..ebf1ffb --- /dev/null +++ b/src/moai/bot/handlers/commands.py @@ -0,0 +1,46 @@ +"""Basic command handlers for MoAI bot.""" + +from telegram import Update +from telegram.ext import ContextTypes + +HELP_TEXT = """ +*MoAI - Master of AIs* + +Multi-AI collaborative brainstorming platform. + +*Project Commands:* +/projects - List all projects +/project new "Name" - Create new project +/project select - Switch to project +/project delete - Delete project +/project models claude,gpt - Set models +/project info - Show current project + +*Discussion Commands:* +/open - Ask all models (parallel) +/discuss [rounds] - Start discussion (default: 3) +/next - Trigger next round +/stop - Stop current discussion + +*Output Commands:* +/consensus - Generate consensus summary +/export - Export project as markdown + +*Utility:* +/status - Show current state +/help - Show this message +""".strip() + + +async def start_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: + """Handle /start command - welcome message.""" + await update.message.reply_text( + "Welcome to MoAI!\n\n" + "Use /help to see available commands.\n" + 'Use /project new "Name" to create your first project.' + ) + + +async def help_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: + """Handle /help command - show available commands.""" + await update.message.reply_text(HELP_TEXT, parse_mode="Markdown")