mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 20:24:03 +00:00
feat(bot): add resident payment confirmation command
This commit is contained in:
@@ -12,12 +12,14 @@ export const enBotTranslations: BotTranslationCatalog = {
|
||||
bind_feedback_topic: 'Bind the current topic as feedback',
|
||||
bind_reminders_topic: 'Bind the current topic as reminders',
|
||||
bind_payments_topic: 'Bind the current topic as payments',
|
||||
payment_add: 'Record your rent or utilities payment',
|
||||
pending_members: 'List pending household join requests',
|
||||
approve_member: 'Approve a pending household member'
|
||||
},
|
||||
help: {
|
||||
intro: 'Household bot is live.',
|
||||
privateChatHeading: 'Private chat:',
|
||||
groupHeading: 'Group chat:',
|
||||
groupAdminsHeading: 'Group admins:'
|
||||
},
|
||||
bot: {
|
||||
@@ -135,6 +137,12 @@ export const enBotTranslations: BotTranslationCatalog = {
|
||||
utilityAdded: (name, amount, currency, period) =>
|
||||
`Utility bill added: ${name} ${amount} ${currency} for ${period}`,
|
||||
utilityAddFailed: (message) => `Failed to add utility bill: ${message}`,
|
||||
paymentAddUsage: 'Usage: /payment_add <rent|utilities> [amount] [USD|GEL]',
|
||||
paymentNoCycle: 'No billing cycle is ready yet.',
|
||||
paymentNoBalance: 'There is no payable balance for that payment type right now.',
|
||||
paymentAdded: (kind, amount, currency, period) =>
|
||||
`Payment recorded: ${kind === 'rent' ? 'rent' : 'utilities'} ${amount} ${currency} for ${period}`,
|
||||
paymentAddFailed: (message) => `Failed to record payment: ${message}`,
|
||||
noStatementCycle: 'No cycle found for statement.',
|
||||
statementTitle: (period) => `Statement for ${period}`,
|
||||
statementLine: (displayName, amount, currency) => `- ${displayName}: ${amount} ${currency}`,
|
||||
|
||||
@@ -12,12 +12,14 @@ export const ruBotTranslations: BotTranslationCatalog = {
|
||||
bind_feedback_topic: 'Назначить текущий топик для анонимных сообщений',
|
||||
bind_reminders_topic: 'Назначить текущий топик для напоминаний',
|
||||
bind_payments_topic: 'Назначить текущий топик для оплат',
|
||||
payment_add: 'Подтвердить оплату аренды или коммуналки',
|
||||
pending_members: 'Показать ожидающие заявки на вступление',
|
||||
approve_member: 'Подтвердить участника дома'
|
||||
},
|
||||
help: {
|
||||
intro: 'Бот для дома подключен.',
|
||||
privateChatHeading: 'Личный чат:',
|
||||
groupHeading: 'Группа дома:',
|
||||
groupAdminsHeading: 'Админы группы:'
|
||||
},
|
||||
bot: {
|
||||
@@ -138,6 +140,12 @@ export const ruBotTranslations: BotTranslationCatalog = {
|
||||
utilityAdded: (name, amount, currency, period) =>
|
||||
`Коммунальный счёт добавлен: ${name} ${amount} ${currency} за ${period}`,
|
||||
utilityAddFailed: (message) => `Не удалось добавить коммунальный счёт: ${message}`,
|
||||
paymentAddUsage: 'Использование: /payment_add <rent|utilities> [amount] [USD|GEL]',
|
||||
paymentNoCycle: 'Биллинг-цикл пока не готов.',
|
||||
paymentNoBalance: 'Сейчас для этого типа оплаты нет суммы к подтверждению.',
|
||||
paymentAdded: (kind, amount, currency, period) =>
|
||||
`Оплата сохранена: ${kind === 'rent' ? 'аренда' : 'коммуналка'} ${amount} ${currency} за ${period}`,
|
||||
paymentAddFailed: (message) => `Не удалось сохранить оплату: ${message}`,
|
||||
noStatementCycle: 'Для выписки период не найден.',
|
||||
statementTitle: (period) => `Выписка за ${period}`,
|
||||
statementLine: (displayName, amount, currency) => `- ${displayName}: ${amount} ${currency}`,
|
||||
|
||||
@@ -10,6 +10,7 @@ export type TelegramCommandName =
|
||||
| 'bind_feedback_topic'
|
||||
| 'bind_reminders_topic'
|
||||
| 'bind_payments_topic'
|
||||
| 'payment_add'
|
||||
| 'pending_members'
|
||||
| 'approve_member'
|
||||
|
||||
@@ -23,6 +24,7 @@ export interface BotCommandDescriptions {
|
||||
bind_feedback_topic: string
|
||||
bind_reminders_topic: string
|
||||
bind_payments_topic: string
|
||||
payment_add: string
|
||||
pending_members: string
|
||||
approve_member: string
|
||||
}
|
||||
@@ -39,6 +41,7 @@ export interface BotTranslationCatalog {
|
||||
help: {
|
||||
intro: string
|
||||
privateChatHeading: string
|
||||
groupHeading: string
|
||||
groupAdminsHeading: string
|
||||
}
|
||||
bot: {
|
||||
@@ -140,6 +143,16 @@ export interface BotTranslationCatalog {
|
||||
utilityNoOpenCycle: string
|
||||
utilityAdded: (name: string, amount: string, currency: string, period: string) => string
|
||||
utilityAddFailed: (message: string) => string
|
||||
paymentAddUsage: string
|
||||
paymentNoCycle: string
|
||||
paymentNoBalance: string
|
||||
paymentAdded: (
|
||||
kind: 'rent' | 'utilities',
|
||||
amount: string,
|
||||
currency: string,
|
||||
period: string
|
||||
) => string
|
||||
paymentAddFailed: (message: string) => string
|
||||
noStatementCycle: string
|
||||
statementTitle: (period: string) => string
|
||||
statementLine: (displayName: string, amount: string, currency: string) => string
|
||||
|
||||
Reference in New Issue
Block a user