Size: a a a

2016 November 14

JB

Jose Berrocal in Dev Chat
No matter the port I try to use on express it will always fail
источник

JB

Jose Berrocal in Dev Chat
Jose Berrocal
No matter the port I try to use on express it will always fail
BTW as I say it fails when I run both together
источник
2016 November 15

IK

Ilya Kostichenko in Dev Chat
Hello guys,i need some help about $.sendMessage with variable from request function
источник

JB

Jose Berrocal in Dev Chat
I guess you need to be more specific with your question
источник

IK

Ilya Kostichenko in Dev Chat
well,i use request module(nodejs).But i can't ge the response.body returned to the user
источник

IK

Ilya Kostichenko in Dev Chat
for example,i got /api/users/1234/balance.
and i'm sending get request.But how can i send it to balanceController,to balanceHandler => $.sendMessage(response.body).
error is the length undefined
источник

JB

Jose Berrocal in Dev Chat
Ok now I got it, I not an expert with this module but I guess that you don't need to use a controller for that, must be a way to send a message directly (of course you need to have the chatID)
источник

IK

Ilya Kostichenko in Dev Chat
should i use native telegram api then instead of telegram-node-bot?
источник

JB

Jose Berrocal in Dev Chat
Well not exactly, because this module should have a way to accomplish what you need, let me search for a while
источник

RX

Ray X in Dev Chat
@jberrocal Have you ever find the root cause of your issue last day?
источник

JB

Jose Berrocal in Dev Chat
Nope 😭 I haven't time for continue
источник

JB

Jose Berrocal in Dev Chat
Ilya Kostichenko
should i use native telegram api then instead of telegram-node-bot?
I guess this is what you need

const tg = new Telegram.Telegram('YOUR_TOKEN', { workers: 1 }) tg.sendMessage(123, 'test message
источник

RX

Ray X in Dev Chat
Error: bind EADDRINUSE null:8000
According to the error message, it should be ip issue or port issue. So just re-check your code, and you may find the root cause.
источник

JB

Jose Berrocal in Dev Chat
Jose Berrocal
I guess this is what you need

const tg = new Telegram.Telegram('YOUR_TOKEN', { workers: 1 }) tg.sendMessage(123, 'test message
Where 123 is the chatID
источник

JB

Jose Berrocal in Dev Chat
Ray X
Error: bind EADDRINUSE null:8000
According to the error message, it should be ip issue or port issue. So just re-check your code, and you may find the root cause.
I tried recreating a new project just with a base route in express and a otherwise route on telegram bot and it fails when try to run both telegram and express, no matter with port I use for express
источник

IK

Ilya Kostichenko in Dev Chat
Jose Berrocal
Where 123 is the chatID
thanks
источник

RX

Ray X in Dev Chat
I'm using http together with telegram-bot, it works.
источник

JB

Jose Berrocal in Dev Chat
Http or express???
источник

RX

Ray X in Dev Chat
http
источник

IK

Ilya Kostichenko in Dev Chat
Ray X
http
can u share some code example about receiving response and parsing and sending it?
источник