datamachine / twx

Unofficial Telegram Bot API for Python
MIT License
25 stars 7 forks source link

reply_markup extra options #5

Closed fopina closed 9 years ago

fopina commented 9 years ago

As a follow up of #4 (opened new issue as #4 was a non-issue and I was using it wrong):

Perfect, nice and easy to use.

But, if I call it like this:

tg.send_message(message.chat.id, reply, reply_to_message_id=message.message_id, reply_markup=ReplyKeyboardMarkup.create(keyboard=[['asd']]))

it works nicely. If I add one of the options such as:

tg.send_message(message.chat.id, reply, reply_to_message_id=message.message_id, reply_markup=ReplyKeyboardMarkup.create(keyboard=[['asd']], one_time_keyboard=True))

It serializes to

reply_markup=%7B%22one_time_keyboard%22%3A+true%2C+%22keyboard%22%3A+%5B%5B%22asd%22%5D%5D%7D

which is exactly what I was doing in my library and the result is the same as with my library: it doesn't work, the keyboard options do not even show up (the whole markup is ignored)

xlopo commented 9 years ago

I am able to reproduce your error.

You stated that the serialized data matches what you were doing in your own library. Was it working in your library when the one_time_keyboard parameter was specified? Or was it also not working in your own library?

I know that there has been a subset of features that have somewhat less than functional since the bot API was release, so I want to try to narrow down if this is twx issue, or if it is a Telegram issue.

fopina commented 9 years ago

Yes, in my attempt to use this I'm sending the data in the same way (and getting the same, lack of, result) https://github.com/fopina/py-tgbot/blob/master/tgbot/types.py#L10-L16 That's why I found your library in the first place, to see if it was working for you and how. I guess it's either bug in the documentation or in their servers then and take it up to @BotSupport..

fopina commented 9 years ago
Bot Support, [29.06.15 15:53]
Hmm. Thanks for the report. Will check it out.

Bot Support, [29.06.15 16:05]
Could it be that you're missing the charset header?

Bot Support, [29.06.15 16:14]
We've just fixed an issue with the custom keyboards. Please try again and tell me if it works now. Sorry!

Working now, it was indeed some issue on Telegram side.

xlopo commented 9 years ago

Thank you for the update. I won't be surprised if we see a handful of similar server side bugs while the infrastructure is maturing.