mirror of
https://github.com/hempyhemp/hh-auto-reply.git
synced 2026-06-08 18:04:57 +00:00
🔧 fix(handler): Добавлен вызов функции createLogger для работы с логгером.
All checks were successful
Deploy / deploy (push) Successful in 50s
All checks were successful
Deploy / deploy (push) Successful in 50s
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import process from 'node:process'
|
||||
|
||||
import TelegramBot from 'node-telegram-bot-api'
|
||||
import { createLogger } from './logger.js'
|
||||
|
||||
const log = createLogger('telegram')
|
||||
|
||||
const token = process.env.TG_BOT_TOKEN!
|
||||
@@ -8,7 +10,8 @@ const bot = new TelegramBot(token, { polling: true })
|
||||
|
||||
bot.on('polling_error', (err: any) => {
|
||||
// EFATAL (socket hang up) — Telegram обрывает long-poll соединение, это нормально
|
||||
if (err?.code === 'EFATAL') return
|
||||
if (err?.code === 'EFATAL')
|
||||
return
|
||||
log.error('polling_error', err?.code, err?.message)
|
||||
})
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import bot from '@bot'
|
||||
import prisma from '@prisma'
|
||||
import { createLogger } from '@/logger'
|
||||
import { listResumes, NoResumeError, saveResume } from '../scraper.js'
|
||||
import { getState } from '../state.js'
|
||||
import { escapeHtml, NO_RESUME_MARKUP, safeEdit } from '../ui.js'
|
||||
|
||||
@@ -6,6 +6,7 @@ import bot from '@bot'
|
||||
import prisma from '@prisma'
|
||||
import { createMessage } from '@/openai'
|
||||
import { loadSession, newStealthContext, randomDelay, randomScroll, withBrowser } from './browser.js'
|
||||
import { createLogger } from '@/logger'
|
||||
import { createStatusReporter, escapeHtml } from './ui.js'
|
||||
|
||||
const log = createLogger('scraper')
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// import * as process from 'node:process'
|
||||
import './globals.js'
|
||||
import bot from '@bot'
|
||||
import prisma from '@prisma'
|
||||
import { createLogger } from './logger.js'
|
||||
import { registerHHCommands, triggerHHStart } from './hh/bot-commands.js'
|
||||
// import * as process from 'node:process'
|
||||
import './globals.js'
|
||||
|
||||
const log = createLogger('index')
|
||||
|
||||
@@ -32,7 +33,7 @@ bot.onText(/\/start/, async (msg) => {
|
||||
if (!existingUser) {
|
||||
await bot.sendMessage(
|
||||
chatId,
|
||||
`👋 Привет, ${msg.from?.first_name ?? 'друг'}!\n\nЭто бот для авто-откликов на hh.ru.\nНачни с логина — нажми 🔑 Логин.`,
|
||||
`👋 Привет, ${msg.from?.first_name ?? 'друг'}!\n\nЭто бот для авто-откликов на hh.ru.\nНачни с логина — нажми 🔑 Войти.`,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ import process from 'node:process'
|
||||
import { createOpencode, createOpencodeClient } from '@opencode-ai/sdk'
|
||||
// import Anthropic from '@anthropic-ai/sdk'
|
||||
import OpenAI from 'openai'
|
||||
import { createLogger } from './logger.js'
|
||||
|
||||
const log = createLogger('llm')
|
||||
|
||||
// export const claude = new Anthropic({
|
||||
|
||||
Reference in New Issue
Block a user