Comments (9)
Do you have a high-speed internet connection on the server where the Bot API server is hosted?
You can enable logs by adding parameters -v4 -l log.txt to the Bot API server and send the file log.txt
to https://t.me/tdlib_bot to know the exact reason.
from telegram-bot-api.
Yes its 1gbps unshared. ( dedicated server )
btw, my bot is a kind of downloader where user sends the instagram post link ( image / video ) and they get the media file. on api.telegram.org it happens in a blink of an eye but on locally it takes 1-2 mins
specially video when i try to send the video i get this error
An error occurred while sending video to user : invalid json response body at http://<DOMAIN.com?/bot/sendVideo reason: Unexpected token < in JSON at position 0
also should i user IP:PORT or domain.com and with http or https ?
from telegram-bot-api.
Why do use domain at all and don't host the Bot API server on the same server as the bot?
from telegram-bot-api.
Bot and BOT API both are hosted on same server, i think because i am using HTTP://ip:port and not HTTPS my download/upload speed is capped to certain kbps maybe
And i thought if i use HTTPS with domain name i will get good speeds
What to do ?
P.S. https://t.me/tdlib_bot not responding
from telegram-bot-api.
Bot and BOT API both are hosted on same server,
Then you should send request to http://127.0.0.1:. You should also consider to send local files using file:// URI scheme as specified in https://github.com/tdlib/telegram-bot-api?tab=readme-ov-file#usage.
from telegram-bot-api.
Files are not on the disk i am sending media link directly to user using replywithVideo / replywithphoto with url,
My bot really works fast on api.telegram.org and i am using same sending methods and i do succeed its just that its super slow on BOT API
These are my logs,
from telegram-bot-api.
In the log upload speed is less than 1 megabit per second. The speed depends on your server and there is no way to upload files with a higher speed.
from telegram-bot-api.
This is my speed tests, also download and uploading speed on other apps are very impressive
from telegram-bot-api.
thats the sample code
const { Telegraf } = require('telegraf');
const bot = new Telegraf('', {
telegram: {
apiRoot: 'http://IP:PORT' },
});
bot.start((ctx) => ctx.reply('Welcome! Use /send to get a video.'));
bot.command('send', (ctx) => {
const videoUrl = '';
ctx.replyWithVideo(videoUrl);
});
bot.launch();
from telegram-bot-api.
Related Issues (20)
- [Feature request] Get chat is_verified HOT 1
- sometimes slow response HOT 9
- clang-18 warnings HOT 1
- github
- [feature req] userProfilePhoto method support HOT 1
- How to handle errors from API HOT 1
- Unable to Start Server with SSL Certificate HOT 2
- API SSL error with some ipv6 addresses HOT 27
- Make InlineQueryResultVideo title optional HOT 1
- Add has_spoiler to InlineQueryResult HOT 1
- InlineQueryResultArticle has broken link_preview_options HOT 7
- Security issues with ID and Hash HOT 5
- message expired less than 24 hour HOT 4
- How to set timeout getUpdates HOT 4
- request Timeout HOT 4
- [API 7.2] Issues with Mixed-Format Sticker Packs HOT 7
- rate limit
- {"ok":false,"error_code":400,"description":"Logged out"} HOT 5
- bot my_chat_member HOT 1
- /answerInlineQuery weird issue HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram-bot-api.