C++ tgbot cpp-应答内联查询
如何使用回答内联查询?我试过几种方法,但都不管用 我最后一次尝试出错:C++ tgbot cpp-应答内联查询,c++,C++,如何使用回答内联查询?我试过几种方法,但都不管用 我最后一次尝试出错:错误请求:无法解析json编码的内联查询结果:意外的字符串结束 bot.getEvents().onInlineQuery([&bot](const TgBot::InlineQuery::Ptr& query) { std::vector<TgBot::InlineQueryResult::Ptr> results; TgBot::InlineQueryResultArticle
错误请求:无法解析json编码的内联查询结果:意外的字符串结束
bot.getEvents().onInlineQuery([&bot](const TgBot::InlineQuery::Ptr& query) {
std::vector<TgBot::InlineQueryResult::Ptr> results;
TgBot::InlineQueryResultArticle::Ptr article(new TgBot::InlineQueryResultArticle);
auto text = TgBot::InputTextMessageContent();
text.messageText = "Inline Test";
article->title = "Inline Title!";
article->id = "1234";
results.push_back(article);
bot.getApi().answerInlineQuery(query->id, results);});
bot.getEvents(){
std::矢量结果;
TgBot::InlineQueryResultArticle::Ptr文章(新的TgBot::InlineQueryResultArticle);
自动文本=TgBot::InputTextMessageContent();
text.messageText=“内联测试”;
文章->标题=“内联标题!”;
物品->id=“1234”;
结果:推回(文章);
getApi().answerInlineQuery(查询->id,结果);});
可能是相关的是的,是的。谢谢:)