mirror of
https://github.com/hempyhemp/hh-auto-reply.git
synced 2026-06-09 02:15:34 +00:00
🔧 fix(file): Изменено использование DEFAULT_PROMPT в handlePrompt()
All checks were successful
Deploy / deploy (push) Successful in 48s
All checks were successful
Deploy / deploy (push) Successful in 48s
This commit is contained in:
@@ -6,7 +6,7 @@ import { doLogin, handleLogin } from './handlers/auth.js'
|
||||
import { handleApply } from './handlers/apply.js'
|
||||
import { handleStatus, handleSkipped } from './handlers/info.js'
|
||||
import { handleMyResume, handleResumeList, handleResumePick } from './handlers/resume.js'
|
||||
import { handleAutoToggle, handleMax, handlePrompt, handleQuery } from './handlers/settings.js'
|
||||
import { DEFAULT_PROMPT, handleAutoToggle, handleMax, handlePrompt, handleQuery } from './handlers/settings.js'
|
||||
|
||||
type MsgHandler = (chatId: number) => Promise<void>
|
||||
type CallbackHandler = (chatId: number, messageId: number) => Promise<void>
|
||||
@@ -67,6 +67,14 @@ const CALLBACK_HANDLERS: Record<string, CallbackHandler> = {
|
||||
state.promptPromptMessageId = null
|
||||
await bot.deleteMessage(chatId, messageId).catch(() => {})
|
||||
},
|
||||
hh_reset_prompt: async (chatId, messageId) => {
|
||||
const state = getState(chatId)
|
||||
state.awaitingPrompt = false
|
||||
state.promptPromptMessageId = null
|
||||
await prisma.user.update({ where: { telegramId: chatId }, data: { prompt: DEFAULT_PROMPT } })
|
||||
await bot.deleteMessage(chatId, messageId).catch(() => {})
|
||||
await bot.sendMessage(chatId, '✅ Промт сброшен на дефолтный')
|
||||
},
|
||||
hh_resume_list: async (chatId, messageId) => {
|
||||
await bot.deleteMessage(chatId, messageId).catch(() => {})
|
||||
await handleResumeList(chatId)
|
||||
|
||||
Reference in New Issue
Block a user