Telegram.Bot icon indicating copy to clipboard operation
Telegram.Bot copied to clipboard

Message_text error in inline mode

Open koroteeww opened this issue 10 years ago • 4 comments

Hello! I've tried to realise inline mode to my bot, but Telegram sends me an error, something like "no message_text field". I assume it is that I am sending InlineQueryResultArticle with some text and urls for user, so InlineQueryResultNew should have field message_text. see https://core.telegram.org/bots/api#inputtextmessagecontent and after I added it in InlineQueryResultNew like this: [JsonProperty("message_text", Required = Required.Always)] public string MessageText { get; set; }

Inline mode works perfectly and no more errors. so consider changing InlineQueryResultNew.cs if you need detailed error text, i think i can provide it...

koroteeww avatar Jun 21 '16 13:06 koroteeww

have you used the InputMessageContent property on InlineQueryResultArticle?

MrRoundRobin avatar Jun 28 '16 15:06 MrRoundRobin

you can also look at the comments here

MrRoundRobin avatar Jun 29 '16 09:06 MrRoundRobin

I used InlineQueryResultArticle

koroteeww avatar Jun 29 '16 09:06 koroteeww

the important part is that you need to specify InputMessageContent, that is what is send by the user, if he selects a result

MrRoundRobin avatar Jun 29 '16 09:06 MrRoundRobin