Giter VIP home page Giter VIP logo

telegram-limits's People

Contributors

antoniomarreti avatar davidegalilei avatar dbsergey avatar durof avatar evgfilim1 avatar knorpelsenf avatar laiteux avatar mubassari avatar nihatfarz avatar rextafa avatar sadykhzadeh avatar sebek05 avatar sominemo avatar tginfo-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram-limits's Issues

Scope of limits: daily or not?

Hello the site doesn't mention the scope of these limits.

Are these absolute limits for any bot (API id, hash pair)?

Or are these daily (24 hours), or weekly?

Specifically for invite to channel, can I invite 200 users max to a channel with my bot or is this reset after some time so that I can start inviting users again?

Add "Read Receipt" feature limits

Limits of "Read Receipt" feature:

  • Max time Read Receipt will be saved in Telegram = 7 days
  • Max members count of group has Read Receipt feature = 100 Users (It was increased, Before it was 50 users)

keyboard limits (bots)

max normal keyboard button : 300
max normal keyboard row : 300
max normal keyboard button per row : 12
max inline keyboard button : 100
max inline keyboard row : 100
max inline keyboard button per row : 8

Birthday change limit

yesterday i have changed my birthday 3 times, and then it didn't let me to change it again. and today i still have no ability to do this. i will report later how long approximately this limit is

Photo resolution limit

Telegram also has limit on photo's resolution. If you upload an image as Photo not document and it had over 1280p on height, Telegram resize and scale the photo in 1280 pixel.

Step to reproduce

  1. download this poster: https://m.media-amazon.com/images/M/MV5BZjdkOTU3MDktN2IxOS00OGEyLWFmMjktY2FiMmZkNWIyODZiXkEyXkFqcGdeQXVyMTMxODk2OTU@._V1_.jpg
    (which has 2430 x 3600p)

  2. then upload it as normal Photo in telegram

  3. download the uploaded photo from telegram

As you can see telegram scaled it down to 1280p

Command description length

You should set minimal Command description length to 3 instead of 2.

BadRequest: Command description length must be at least 3

Max number of emojis rendered with custom font

there's a limit on number of emojis which can be used in a single message and are rendered by tg - exceeding that, the emoji rendering falls back to system emoji.

The limit was about 50 emojis per message, but i am not sure.

i am not even sure if this applies only to tgand or applies to other official clients too

Про длину текста в Telegra.ph

На сайте написано:

изображение

Это не совсем так. Два примера:
https://telegra.ph/aa-08-07-7 (65 507 символов "f" + заголовок из двух английских "a")
https://telegra.ph/aa-08-07-8 (32 753 символа "ф" + заголовок из двух английских "a")
Умножая 32 753 на 2, получаем 65 506, из чего можно сделать вывод, что лимит по тексту высчитывается не в количестве символов, а в килобайтах (кириллические символы занимают по два байта, в то время как латинские – по одному).
Итоговый лимит приблизительно равен 64 кибибайтам, а разница между 65507 и 65536 – метаданные, которые хранятся вместе с текстом.

accounts number

Add accounts that can be managed by the app:
Accounts
up to 3

Markup limits

Description

On markup json len > 10kB:

BadRequest: Reply markup is too long

Example

import asyncio
import logging

from aiogram import Bot
from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

API_TOKEN = '1234567890:YourBotToken'
RECIPIENT_ID = 66812456  # your user_id
TEN = "1234567890"
MULTIPLIER = 6

async def main():
    bot = Bot(token=API_TOKEN)
    await bot.send_message(RECIPIENT_ID, "1", reply_markup=_prepare_markup())
    await _close_bot(bot)


def _prepare_markup() -> InlineKeyboardMarkup:
    """Prepare long markup."""
    markup = InlineKeyboardMarkup()
    buttons = [InlineKeyboardButton(TEN * MULTIPLIER, callback_data=TEN) for _ in range(100)]
    markup.add(*buttons)
    logger.info("Markup len: %s", len(markup.as_json()))
    return markup


async def _close_bot(bot: Bot):
    session = await bot.get_session()
    await session.close()


if __name__ == '__main__':
    asyncio.run(main())

Geo groups limit

Limit of Geo groups you can join is 5, Then you can't join
Geo groups is groups in people nearby.

This an error message if you wanted to join more than 5 (In another language):
Error message in Telegram Android

Filename limitation

telegram has length limit on filename which is 60, for example upload a text file with more than 65 characters on the filename, telegram will trim the last 5 characters

Please add upload profile pic limit

I make a userbot that can change profile pictures on telegram but i don't know how long the limit sometime I got limited from telegram said FLOOD_WAIT_X

Account - Bio

Links in bio are clickable for Premium users while they are just plain text for non-Premium users

Messages - Flood limit

From my tests occuring lately, we can roughly send/forward 2k -> 2.3k messages in a row and then getting a ~50 min timeout
No information on how many times before having Spam Bot taking actions

This data was collected among hours of forwarding tests over a 5 days span.
I thought that Premium didn't change a thing, tho recently I successfully achieved forwarding 3300 messages and then getting a floodwait error of 2983 seconds (~50 min). Weird as previous tests were also done using a Premium account
So the data may not be 100% reliable.
In the end, don't risk your account on this :)

Tips for Video-avatar

I suggest this change:
Video-avatar duration
up to 10 seconds

into

Video-avatar (for chats profile and channels)
up to 10 seconds, 800x800, max 2Mb

BotAPI SendContact limits

My bot yesterday hit a FloodWait limit solely for the sendContact method (70K+ seconds).

All other methods are working normally.

exact Filesize limit

I found out the exact filesizelimit is 2097152000 Bytes (so its 2000 MiB, not 2GB or 2GiB).
Asuming the number used in tdlib is the same as the serverside limit.

This is my source:
An error is thrown when the file is bigger than MAX_FILE_SIZE: https://github.com/tdlib/td/blob/master/td/telegram/files/FileManager.cpp#L1007
which is defined here: https://github.com/tdlib/td/blob/master/td/telegram/files/FileManager.cpp#L56

I tested it by uploading a file exactly 2097152000 Bytes in size (worked)
and uploading a file exactly 2097152001 Bytes in size (failed).

It would be nice to have this exact limit listed on the Website. Maybe as mouseover-tooltip?
Same applies for the bot-api limits.
The text "up to 2000 MB" is not correct. it would need to be "up to 2000 MiB"

BTW: the other limits are listed in that file as well:
https://github.com/tdlib/td/blob/master/td/telegram/files/FileManager.cpp#L953-L955

Bot limit 20: with premium up to 40

That's real because my BotFather says this:

Sorry, you can't add more than 40 bots. To create a new bot, delete one of your bots or transfer ownership of one of your bots to a different person.

Did you notice the "40 bots" part? That's the limit for Premium users.

File name length max is 63, not 60.

Test done - upload
aaaaaaaaaaaaaaaaaaabbbbbbbbbbcccccccccccccccddddddddddddddddeeeeeeeeeeeeeeeeffffffffffffffffggggggggggggghhhhhhhhhhhhhhiiiiiiiiiiiiijjjjjjjjj.jpg
restart client, see it got renamed to
aaaaaaaaaaaaaaaaaaabbbbbbbbbbcccccccccccccccddddddddddddddddeee.jpg

Send the same again but with .jpeg, it gets renamed to

aaaaaaaaaaaaaaaaaaabbbbbbbbbbcccccccccccccccddddddddddddddddeee.jpeg

Therefore the limit is 63, and extension size is ignored as long as it is proper (otherwise TG drops extension)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.