Closed ghost closed 5 years ago
Hi @jbBorya, thank you and I'm glad you found the library useful.
According to Telegram's Bot API documentation, the callback_data
to be sent for each button has a size limit of 64 bytes
.
I'm not aware of any way to go beyond the size limit. Sorry about that!
Thank you for the response ^^
Dear edisonchee,
your API keeps its promise. It's straightforward but effective. Thank you.
I experienced something (maybe) odd regarding the attribute
callback_data
of a button in aninlineKeyboard
. In my case, every button represents an object of the classEvent
, which is retrieved from a database.Obviously I want to determine which button was clicked by listening for the event
callback_query
.query.data
is a stringified JSON object. Parsing does work but if the string contains too many characters I would get the following error.Unhandled rejection Error: 400: {"ok":false,"error_code":400,"description":"Bad Request: BUTTON_DATA_INVALID"}
Here is my sourcecode for reference.
Creation of the buttons:
This works but I actually want to store more data in
value
. Is there an alternative?Thank you in advance! Joachim