-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sendMessage method has high delay time #433
Comments
Why are you using express for handling ?? |
Use setWebhook instead and provide a crt.pem file with open-ssl |
@AliSawari using express js will provide more control of webhook endpoints. If you wont be using express you should install Nginx, to make routing to your webhook url. I have solved my problem regarding slow send time. It was because of proxy that is used to get access to internet. My virtual machine providers intentionally made it slow for their own reasons. |
@SuperMasterBlasterLaser so now the bot is doing fine ? can I use express just like you for routing? |
@AliSawari Yes. Bot works fine. If you open this example you can see how express is being used for handling Telegram's data. |
Thanks a lot :) |
@AliSawari @SuperMasterBlasterLaser i have done the same by running other websockets in the system and it drives the api slow. how do we resolve that? |
Hello.
I'm using my bot via webhooks and incoming messages from telegram are being handled by express js:
Then I'm trying to respond to telegram by using
sedn message
methodMy bot receives messages very fas. However, responding via
sendMessage
takes from 2-5 seconds.i'm using NodeJS v.8.6.0
OS is RHEL 7
Bot is launched via PM2
My remote machine internet access works via proxy. However, it has no delay, because I have made
curl
requests to telegram API and it responsd very fast.Did I miss something?
The text was updated successfully, but these errors were encountered: