fix: update est-time #20

Merged
redrockjs merged 1 commits from dev into main 2024-05-22 05:19:53 +00:00

View File

@@ -44,14 +44,17 @@ const main = async () => {
let {title, groupName, subject, user, estimatedDate, estimatedTime} = parseMessage(parsed.text)
const estimated = (estimatedDate === undefined && estimatedTime === undefined)
? `Время выполнения: не указано`
: `Время выполнения: ${estimatedDate} ${estimatedTime}`
const preparedMessage =
`📌 Новое обращение: ${title}\n` +
`Группа: ${groupName}\n` +
`${user}\n` +
`${subject}\n` +
(estimatedDate && estimatedTime)
? `Время выполнения: ${estimatedDate} ${estimatedTime}\n`
: 'Время выполнения: не указано'
`Время выполнения: ${estimated}\n`
if (preparedMessage) {
bot.telegram.sendMessage(process.env.TELEGRAM_GROUP_ID, preparedMessage)