Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
El bot de Telegram no envía mensajes a uno de mis grupos

Creé un bot de Telegram usando Node.js para enviar un mensaje de texto en momentos específicos. Entonces, tengo 2 grupos: uno para probar y otro para ejecutarlo. Funciona perfectamente en el grupo de prueba, pero no responde cuando se supone que debe ejecutarse en mi grupo real. Obtuve ambos chatId del enlace de Telegram Web. Entonces, ¿qué puede estar mal?

  • Bot es un administrador en ambos grupos
  • Mi cuenta también es un administrador, pero no soy el creador del grupo real, sin embargo, puedo hacer todo en mi grupo real, excepto agregar nuevos administradores y permanecer en el anonimato.
  • Configuración de privacidad deshabilitada de BotFather

El código

 const telegramBot = require("node-telegram-bot-api"); const token = "THE_API_KEY"; const bot = new telegramBot(token, { polling: true }); const cron = require('node-cron'); let chatId = -111111111; cron.schedule('59 6 15 * * 2', () => { bot.sendMessage(chatId, "some string value"); },{ scheduled: true, timezone: "Etc/UTC" }); cron.schedule('59 1 12 * * 7', () => { bot.sendMessage(chatId, "some different string value"); },{ scheduled: true, timezone: "Etc/UTC" }); // The part below this comment line works perfectly fine on both groups bot.on("message", msg => { const chatId = msg.chat.id; const message = msg.text.trim().toLocaleLowerCase(); switch (message) { case "xx": bot.sendMessage(chatId, "text"); break; case "xx": bot.sendMessage( chatId, "text" ); break; case "#whoareyou": bot.sendMessage( chatId, "text" ); break; } });

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!