feat(bot): implement /app and /keyboard commands, add dashboard links

This commit is contained in:
2026-03-15 02:13:32 +04:00
parent 531e52b238
commit 3c53ab9e1a
6 changed files with 159 additions and 11 deletions

View File

@@ -13,7 +13,9 @@ export const enBotTranslations: BotTranslationCatalog = {
join_link: 'Get a shareable link for new members to join',
payment_add: 'Record your rent or utilities payment',
pending_members: 'List pending household join requests',
approve_member: 'Approve a pending household member'
approve_member: 'Approve a pending household member',
app: 'Open the Kojori mini app',
keyboard: 'Toggle persistent dashboard button'
},
help: {
intro: 'Household bot is live.',
@@ -121,6 +123,11 @@ export const enBotTranslations: BotTranslationCatalog = {
joinLinkReady: (link, householdName) =>
`Join link for ${householdName}:\n${link}\n\nAnyone with this link can join the household. Share it carefully.`
},
keyboard: {
dashboardButton: '🏡 Dashboard',
enabled: 'Persistent dashboard button enabled.',
disabled: 'Persistent dashboard button disabled.'
},
anonymousFeedback: {
title: 'Anonymous household note',
cancelButton: 'Cancel',
@@ -236,7 +243,7 @@ export const enBotTranslations: BotTranslationCatalog = {
reminders: {
utilities: (period) => `Utilities reminder for ${period}`,
rentWarning: (period) => `Rent reminder for ${period}: payment is coming up soon.`,
rentDue: (period) => `Rent due reminder for ${period}: please settle payment today.`,
rentDue: (period) => `Rent is due for period ${period}. Request sent to the reminders topic.`,
guidedEntryButton: 'Guided entry',
copyTemplateButton: 'Copy template',
openDashboardButton: 'Open dashboard',

View File

@@ -13,7 +13,9 @@ export const ruBotTranslations: BotTranslationCatalog = {
join_link: 'Получить ссылку для приглашения новых участников',
payment_add: 'Подтвердить оплату аренды или коммуналки',
pending_members: 'Показать ожидающие заявки на вступление',
approve_member: 'Подтвердить участника дома'
approve_member: 'Подтвердить участника дома',
app: 'Открыть мини-приложение Kojori',
keyboard: 'Вкл/выкл кнопку дашборда'
},
help: {
intro: 'Бот для дома подключен.',
@@ -123,6 +125,11 @@ export const ruBotTranslations: BotTranslationCatalog = {
joinLinkReady: (link, householdName) =>
`Поделитесь этой ссылкой, чтобы пригласить участников в ${householdName}:\n\n${link}\n\nЛюбой, у кого есть эта ссылка, может подать заявку на вступление.`
},
keyboard: {
dashboardButton: '🏡 Дашборд',
enabled: 'Кнопка дашборда включена.',
disabled: 'Кнопка дашборда выключена.'
},
anonymousFeedback: {
title: 'Анонимное сообщение по дому',
cancelButton: 'Отменить',

View File

@@ -12,6 +12,8 @@ export type TelegramCommandName =
| 'payment_add'
| 'pending_members'
| 'approve_member'
| 'app'
| 'keyboard'
export interface BotCommandDescriptions {
help: string
@@ -25,6 +27,8 @@ export interface BotCommandDescriptions {
payment_add: string
pending_members: string
approve_member: string
app: string
keyboard: string
}
export interface PendingMemberSummary {
@@ -107,6 +111,11 @@ export interface BotTranslationCatalog {
joinLinkUnavailable: string
joinLinkReady: (link: string, householdName: string) => string
}
keyboard: {
dashboardButton: string
enabled: string
disabled: string
}
anonymousFeedback: {
title: string
cancelButton: string