feat: add group duty pin notification feature
All checks were successful
CI / lint-and-test (push) Successful in 23s
All checks were successful
CI / lint-and-test (push) Successful in 23s
- Introduced a new configuration option `DUTY_PIN_NOTIFY` to control whether the bot re-pins the duty message when updated, providing notifications to group members. - Updated the architecture documentation to reflect the new functionality of re-pinning duty messages. - Enhanced the `.env.example` file to include the new configuration option with a description. - Added tests to verify the behavior of the new refresh pin command and its integration with the existing group duty pin functionality. - Updated internationalization messages to include help text for the new `/refresh_pin` command.
This commit is contained in:
@@ -13,6 +13,11 @@ MESSAGES: dict[str, dict[str, str]] = {
|
||||
"help.set_phone": "/set_phone — Set or clear phone for duty display",
|
||||
"help.calendar_link": "/calendar_link — Get personal calendar subscription link (private chat)",
|
||||
"help.pin_duty": "/pin_duty — In a group: pin the duty message (bot needs admin with Pin messages)",
|
||||
"help.refresh_pin": "/refresh_pin — In a group: refresh pinned duty message text immediately",
|
||||
"refresh_pin.group_only": "The /refresh_pin command works only in groups.",
|
||||
"refresh_pin.no_message": "There is no pinned duty message to refresh in this chat.",
|
||||
"refresh_pin.updated": "Pinned duty message updated.",
|
||||
"refresh_pin.failed": "Could not update the pinned message (permissions or edit error).",
|
||||
"calendar_link.private_only": "The /calendar_link command is only available in private chat.",
|
||||
"calendar_link.access_denied": "Access denied.",
|
||||
"calendar_link.success": (
|
||||
@@ -82,6 +87,11 @@ MESSAGES: dict[str, dict[str, str]] = {
|
||||
"help.set_phone": "/set_phone — Указать или очистить телефон для отображения в дежурстве",
|
||||
"help.calendar_link": "/calendar_link — Получить ссылку на персональную подписку календаря (только в личке)",
|
||||
"help.pin_duty": "/pin_duty — В группе: закрепить сообщение о дежурстве (нужны права админа у бота)",
|
||||
"help.refresh_pin": "/refresh_pin — В группе: немедленно обновить текст закреплённого сообщения о дежурстве",
|
||||
"refresh_pin.group_only": "Команда /refresh_pin работает только в группах.",
|
||||
"refresh_pin.no_message": "В этом чате нет закреплённого сообщения о дежурстве для обновления.",
|
||||
"refresh_pin.updated": "Закреплённое сообщение о дежурстве обновлено.",
|
||||
"refresh_pin.failed": "Не удалось обновить закреплённое сообщение (права или ошибка редактирования).",
|
||||
"calendar_link.private_only": "Команда /calendar_link доступна только в личке.",
|
||||
"calendar_link.access_denied": "Доступ запрещён.",
|
||||
"calendar_link.success": (
|
||||
|
||||
Reference in New Issue
Block a user