Reputation: 1132
I am using
https://www.npmjs.com/package/node-telegram-bot-api
error: [polling_error] {"code":"ETELEGRAM ","message":"ETELEGRAM : 404 not found"
let replyText = "Hi I am Tammy";
const TelegramBot = require('node-telegram-bot-api');
const token = xxxxxxxxx;
const bot = new TelegramBot(token, {polling: true});
bot.onText(/\/echo (.+)/, (msg, match) => {
const chatId = msg.chat.id;
const resp = match[1]; // the captured "whatever"
bot.sendMessage(chatId, resp);
});
bot.on('message', (msg) => {
const chatId = msg.chat.id;
bot.sendMessage(chatId, replyText );
});
Any help or suggestion would be thankful.
Upvotes: 3
Views: 14676
Reputation: 1752
I solved it by removing the "bot" which I added at the beginning of the API_TOKEN.
Upvotes: 1
Reputation: 563
try disable or change to other your Telegram proxy.
Also you can see additional info here: https://github.com/yagop/node-telegram-bot-api/issues/562#issuecomment-382313307
Upvotes: 1