feat: register bot commands for Telegram menu

This commit is contained in:
2026-05-20 19:44:04 +02:00
parent f9c20b2a17
commit e64010591a
+15
View File
@@ -40,5 +40,20 @@ export function createBot(token: string, chatId: string, db: Database): Telegraf
console.error('Bot error:', err); 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; return bot;
} }