Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

288
Visualizações
getaddrinfo ENOTFOUND api.telegram.org (Telegraf)

This is my code

const config = require('./config.json');
const {Telegraf} = require('telegraf');
// require('dotenv').config();
const bot = new Telegraf(config.BOT_TOKEN);
bot.use((ctx) => {
    ctx.reply('Bot has started');
});
bot.launch()

every time I run this code it give me error and the error is

D:\Danish\Node testing\Node Bot Testing\node_modules\node-fetch\lib\index.js:1491 reject(new FetchError(request to ${request.url} failed, reason: ${err.message}, 'system', err)); ^ FetchError: request to https://api.telegram.org/bot5121286363:[REDACTED]/getMe failed, reason: getaddrinfo ENOTFOUND api.telegram.org at ClientRequest. (D:\Danish\Node testing\Node Bot Testing\node_modules\node-fetch\lib\index.js:1491:11) at ClientRequest.emit (node:events:527:28) at TLSSocket.socketErrorListener (node:_http_client:454:9) at TLSSocket.emit (node:events:527:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) { type: 'system', errno: 'ENOTFOUND', code: 'ENOTFOUND' } [nodemon] app crashed - waiting for file changes before starting...

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda