feat(ops): sync Telegram commands after deploy

This commit is contained in:
2026-03-09 05:15:44 +04:00
parent 4e200b506a
commit 4d3c206f5f
5 changed files with 303 additions and 25 deletions

View File

@@ -1,24 +1,13 @@
import { Bot } from 'grammy'
import type { Logger } from '@household/observability'
import { formatTelegramHelpText } from './telegram-commands'
export function createTelegramBot(token: string, logger?: Logger): Bot {
const bot = new Bot(token)
bot.command('help', async (ctx) => {
await ctx.reply(
[
'Household bot scaffold is live.',
'Available commands:',
'/help - Show command list',
'/household_status - Show placeholder household status',
'/setup [household name] - Register this group as a household',
'/bind_purchase_topic - Bind the current topic as the purchase topic',
'/bind_feedback_topic - Bind the current topic as the feedback topic',
'/pending_members - List pending household join requests',
'/approve_member <telegram_user_id> - Approve a pending member',
'/anon <message> - Send anonymous household feedback in a private chat'
].join('\n')
)
await ctx.reply(formatTelegramHelpText())
})
bot.command('household_status', async (ctx) => {