From e64010591a950eb0da2fe808e44e564d4aa402aa Mon Sep 17 00:00:00 2001 From: Sjoerd de Vries Date: Wed, 20 May 2026 19:44:04 +0200 Subject: [PATCH] feat: register bot commands for Telegram menu --- src/bot/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/bot/index.ts b/src/bot/index.ts index 05978f5..4f4a03e 100644 --- a/src/bot/index.ts +++ b/src/bot/index.ts @@ -40,5 +40,20 @@ export function createBot(token: string, chatId: string, db: Database): Telegraf console.error('Bot error:', err); }); + bot.telegram.setMyCommands([ + { command: 'log', description: 'Log a session — e.g. /log 2h or /log 45m' }, + { command: 'skip', description: 'Skip today\'s session — e.g. /skip work trip' }, + { command: 'snooze', description: 'Remind me again in 2 hours' }, + { command: 'status', description: 'Today\'s plan and completion state' }, + { command: 'history', description: 'Last 7 sessions' }, + { command: 'streak', description: 'Current and longest streak' }, + { command: 'progress', description: 'AI analysis of recent progress' }, + { command: 'next', description: 'AI recommendation for next training step' }, + { command: 'reschedule', description: 'AI-generated schedule — e.g. /reschedule busy next week' }, + { command: 'chat', description: 'Free-form coaching — e.g. /chat how am I doing?' }, + { command: 'settings', description: 'View or change settings — e.g. /settings model gpt-4o' }, + { command: 'setup', description: 'First-time onboarding' }, + ]).catch((err) => console.error('Failed to set bot commands:', err)); + return bot; }