ba0f3 / telebot.nim

Async Telegram Bot API Client implement in @Nim-Lang
MIT License
165 stars 24 forks source link

Broken example and possibly broken InlineKeyBoardButton #74

Closed baalajimaestro closed 2 years ago

baalajimaestro commented 2 years ago

I tried the example mentioned here

And everytime with every installation of Nim 1.6.4 or master, i am able to replicate

Exception message: Bad Request: can't parse reply keyboard markup JSON object

There is no particular OS that i have found to work. I have tried multiple OS to confirm this issue.

baalajimaestro commented 2 years ago

What looks like the issue is, the json spitted out by marshalling the newInlineKeyBoardMarkup is not a valid JSON.

{"inline_keyboard":[[(text: "Tap", url: none(string), loginUrl: ..., callbackData: none(string), webApp: ..., switchInlineQuery: some("TRtd2t2"), switchInlineQueryCurrentChat: none(string), callbackGame: none(CallbackGame), pay: none(bool))]]}

This is an example JSON from the markup