Node-telegram-bot-api: sendMessage: Current maximum length is 4096 UTF8 characters

Created on 4 Jul 2016  路  8Comments  路  Source: yagop/node-telegram-bot-api

It seems that Telegram has a maximum message length of 4096 characters.

Some implementations have tried to work around it like so:
https://github.com/lukefx/hubot-telegram/blob/d0bc8c115d269a2fb6f292121a163012f1e29fb7/src/telegram.coffee#L74-L102

The biggest issue I'm having is message ordering, i.e., messages doesn't necessarily get delivered in the same order that they are sent, even if sent sequentially.

I'm wondering how others are working around this?

Phillip.

Most helpful comment

I think this would better be implemented in a higher-level wrapper around this library. The wrapper would handle 'paging' and its complexities for different API methods/types, such as 4096 chars for message.text, 200 chars for message.caption, etc.

All 8 comments

I think this would better be implemented in a higher-level wrapper around this library. The wrapper would handle 'paging' and its complexities for different API methods/types, such as 4096 chars for message.text, 200 chars for message.caption, etc.

I think this would better be implemented in a higher-level wrapper around this library. The wrapper would handle 'paging' and its complexities for different API methods/types, such as 4096 chars for message.text, 200 chars for message.caption, etc.

I'm in agreement, but that could be just because I'm lazy and there are some idiosyncrasies of the way that Telegram seems to handle the order of message delivery.

Someone with some energy and time to spare should take the idea and spin up a nice library out of it.

Order of message delivery is quite an issue in almost all messaging platforms, particularly due to their distributed architecture i.e. asynchronous workings of the workers within.

See #192 for some relevant information on this issue.

Closing this issue as it seems the thread hit rock bottom! Thanks @phillipadsmith for your time.

See #192 for some relevant information on this issue.

@GochoMugo Yes, quite delayed in my response here... :-/ So, reading that other thread, do you believe that there will be a resolution via the node-telegram-bot-api package?

Currently, I do not think there are plans to add such advanced functionality. I would suggest building a library on top of this one. But if you can fit it into this library and draft a PR, we would be better placed to discuss and decide on the way forward.

I built a library, tgfancy, that supports paging long text.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lenny76 picture lenny76  路  3Comments

antonrifco picture antonrifco  路  3Comments

Hostile picture Hostile  路  3Comments

hems picture hems  路  3Comments

Rezania815 picture Rezania815  路  3Comments