mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 20:24:03 +00:00
feat(bot): add reminders topic binding command
This commit is contained in:
@@ -10,6 +10,7 @@ export const enBotTranslations: BotTranslationCatalog = {
|
||||
setup: 'Register this group as a household',
|
||||
bind_purchase_topic: 'Bind the current topic as purchases',
|
||||
bind_feedback_topic: 'Bind the current topic as feedback',
|
||||
bind_reminders_topic: 'Bind the current topic as reminders',
|
||||
pending_members: 'List pending household join requests',
|
||||
approve_member: 'Approve a pending household member'
|
||||
},
|
||||
@@ -52,7 +53,7 @@ export const enBotTranslations: BotTranslationCatalog = {
|
||||
[
|
||||
`Household ${created ? 'created' : 'already registered'}: ${householdName}`,
|
||||
`Chat ID: ${telegramChatId}`,
|
||||
'Next: open the purchase topic and run /bind_purchase_topic, then open the feedback topic and run /bind_feedback_topic.',
|
||||
'Next: open the purchase topic and run /bind_purchase_topic, then open the feedback topic and run /bind_feedback_topic. If you want a dedicated reminders topic, open it and run /bind_reminders_topic.',
|
||||
'Members should open the bot chat from the button below and confirm the join request there.'
|
||||
].join('\n'),
|
||||
useBindPurchaseTopicInGroup: 'Use /bind_purchase_topic inside the household group topic.',
|
||||
@@ -61,6 +62,9 @@ export const enBotTranslations: BotTranslationCatalog = {
|
||||
useBindFeedbackTopicInGroup: 'Use /bind_feedback_topic inside the household group topic.',
|
||||
feedbackTopicSaved: (householdName, threadId) =>
|
||||
`Feedback topic saved for ${householdName} (thread ${threadId}).`,
|
||||
useBindRemindersTopicInGroup: 'Use /bind_reminders_topic inside the household group topic.',
|
||||
remindersTopicSaved: (householdName, threadId) =>
|
||||
`Reminders topic saved for ${householdName} (thread ${threadId}).`,
|
||||
usePendingMembersInGroup: 'Use /pending_members inside the household group.',
|
||||
useApproveMemberInGroup: 'Use /approve_member inside the household group.',
|
||||
approveMemberUsage: 'Usage: /approve_member <telegram_user_id>',
|
||||
|
||||
@@ -10,6 +10,7 @@ export const ruBotTranslations: BotTranslationCatalog = {
|
||||
setup: 'Подключить эту группу как дом',
|
||||
bind_purchase_topic: 'Назначить текущий топик для покупок',
|
||||
bind_feedback_topic: 'Назначить текущий топик для анонимных сообщений',
|
||||
bind_reminders_topic: 'Назначить текущий топик для напоминаний',
|
||||
pending_members: 'Показать ожидающие заявки на вступление',
|
||||
approve_member: 'Подтвердить участника дома'
|
||||
},
|
||||
@@ -54,7 +55,7 @@ export const ruBotTranslations: BotTranslationCatalog = {
|
||||
[
|
||||
`${created ? 'Дом создан' : 'Дом уже подключён'}: ${householdName}`,
|
||||
`ID чата: ${telegramChatId}`,
|
||||
'Дальше: откройте топик покупок и выполните /bind_purchase_topic, затем откройте топик обратной связи и выполните /bind_feedback_topic.',
|
||||
'Дальше: откройте топик покупок и выполните /bind_purchase_topic, затем откройте топик обратной связи и выполните /bind_feedback_topic. Если хотите отдельный топик для напоминаний, откройте его и выполните /bind_reminders_topic.',
|
||||
'Участники должны открыть чат с ботом по кнопке ниже и подтвердить заявку на вступление.'
|
||||
].join('\n'),
|
||||
useBindPurchaseTopicInGroup: 'Используйте /bind_purchase_topic внутри топика группы дома.',
|
||||
@@ -63,6 +64,9 @@ export const ruBotTranslations: BotTranslationCatalog = {
|
||||
useBindFeedbackTopicInGroup: 'Используйте /bind_feedback_topic внутри топика группы дома.',
|
||||
feedbackTopicSaved: (householdName, threadId) =>
|
||||
`Топик обратной связи сохранён для ${householdName} (тред ${threadId}).`,
|
||||
useBindRemindersTopicInGroup: 'Используйте /bind_reminders_topic внутри топика группы дома.',
|
||||
remindersTopicSaved: (householdName, threadId) =>
|
||||
`Топик напоминаний сохранён для ${householdName} (тред ${threadId}).`,
|
||||
usePendingMembersInGroup: 'Используйте /pending_members внутри группы дома.',
|
||||
useApproveMemberInGroup: 'Используйте /approve_member внутри группы дома.',
|
||||
approveMemberUsage: 'Использование: /approve_member <telegram_user_id>',
|
||||
|
||||
@@ -8,6 +8,7 @@ export type TelegramCommandName =
|
||||
| 'setup'
|
||||
| 'bind_purchase_topic'
|
||||
| 'bind_feedback_topic'
|
||||
| 'bind_reminders_topic'
|
||||
| 'pending_members'
|
||||
| 'approve_member'
|
||||
|
||||
@@ -19,6 +20,7 @@ export interface BotCommandDescriptions {
|
||||
setup: string
|
||||
bind_purchase_topic: string
|
||||
bind_feedback_topic: string
|
||||
bind_reminders_topic: string
|
||||
pending_members: string
|
||||
approve_member: string
|
||||
}
|
||||
@@ -73,6 +75,8 @@ export interface BotTranslationCatalog {
|
||||
purchaseTopicSaved: (householdName: string, threadId: string) => string
|
||||
useBindFeedbackTopicInGroup: string
|
||||
feedbackTopicSaved: (householdName: string, threadId: string) => string
|
||||
useBindRemindersTopicInGroup: string
|
||||
remindersTopicSaved: (householdName: string, threadId: string) => string
|
||||
usePendingMembersInGroup: string
|
||||
useApproveMemberInGroup: string
|
||||
approveMemberUsage: string
|
||||
|
||||
Reference in New Issue
Block a user