我正在使用
Node 模块
https://www.npmjs.com/package/node-telegram-bot-api
错误
错误:[polling_error] {“code”:“ETELEGRAM”,“message”:“ETELEGRAM:404未找到”
我的代码
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 );
});
任何帮助或建议将不胜感激。
最佳答案
尝试禁用或更改为其他 Telegram 代理。
您还可以在此处查看其他信息: https://github.com/yagop/node-telegram-bot-api/issues/562#issuecomment-382313307
关于node.js - Nodejs Telegram 机器人消息收到轮询错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51221334/