Open raminafhami opened 6 years ago
Hi I have this code block in server.js file:
const Telegram = require('telegram-node-bot') const tg = new Telegram.Telegram('***********token**************',{ workers:1 }); const pingController = require('./controllers/ping') ,otherwiseController = require('./controllers/otherwise') tg.router.when(new Telegram.TextCommand('/ping','pingCommand'), new pingController()) .otherwise(new otherwiseController());
and this code block in ping.js file:
const Telegram = require('telegram-node-bot'); class pingController extends Telegram.TelegramBaseController{ pingHandler($){ $.sendMessage('pong'); } get routes() { return{ 'pingCommand': 'pingHandler' }; } } module.exports = pingController;
and finally this code block in otherwise file:
const Telegram = require('telegram-node-bot'); class otherwiseController extends Telegram.TelegramBaseController{ handler($){ $.sendMessage('Sorry!!!') } } module.exports = otherwiseController;
when I run node server.js, I just got error like this: [error]
Network error: Error: connect ETIMEDOUT 149.154.167.220:443 at Object._errnoException (util.js:1031:13) at _exceptionWithHostPort (util.js:1052:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1195:14) request TelegramApiRequest { _method: 'setWebhook', _params: { url: '' }, _multipart: undefined }
Also, the telegram is filtered in our country!!!, and I use the Siphon 3 proxy.
I met the same question
Hi, it looks the IP is old, on my phone it works, but on NR i have the same problem.. we need the new server IP
Hi I have this code block in server.js file:
and this code block in ping.js file:
and finally this code block in otherwise file:
when I run node server.js, I just got error like this: [error]
Also, the telegram is filtered in our country!!!, and I use the Siphon 3 proxy.