Open Amirhan-Taipovjan-Greatest-I opened 1 month ago
Even this Code:
bot.getEvents().onInlineQuery([&bot](const InlineQuery::Ptr& query) {
vector<InlineQueryResult::Ptr> lol;
InlineQueryResultArticle::Ptr rofl(new InlineQueryResultArticle);
auto testus = InputTextMessageContent();
testus.messageText = "lol";
rofl->title = "Inline Title!";
rofl->id = "1234";
lol.push_back(rofl);
bot.getApi().answerInlineQuery(query->id, lol);
});
And even reinstalling tgbot-cpp
via vcpkg
didn't help, the Issue still persists!
Temporary fix for this Issue is:
Putting this Piece of Code in your .cpp:
using namespace std;
using namespace TgBot;
const string InlineQueryResultCachedAudio::TYPE = "audio";
const string InlineQueryResultCachedDocument::TYPE = "document";
const string InlineQueryResultCachedGif::TYPE = "gif";
const string InlineQueryResultCachedMpeg4Gif::TYPE = "mpeg4_gif";
const string InlineQueryResultCachedPhoto::TYPE = "photo";
const string InlineQueryResultCachedSticker::TYPE = "sticker";
const string InlineQueryResultCachedVideo::TYPE = "video";
const string InlineQueryResultCachedVoice::TYPE = "voice";
const string InlineQueryResultArticle::TYPE = "article";
const string InlineQueryResultAudio::TYPE = "audio";
const string InlineQueryResultContact::TYPE = "contact";
const string InlineQueryResultGame::TYPE = "game";
const string InlineQueryResultDocument::TYPE = "document";
const string InlineQueryResultGif::TYPE = "gif";
const string InlineQueryResultLocation::TYPE = "location";
const string InlineQueryResultMpeg4Gif::TYPE = "mpeg4_gif";
const string InlineQueryResultPhoto::TYPE = "photo";
const string InlineQueryResultVenue::TYPE = "venue";
const string InlineQueryResultVideo::TYPE = "video";
const string InlineQueryResultVoice::TYPE = "voice";
const string InputTextMessageContent::TYPE = "text";
const string InputLocationMessageContent::TYPE = "location";
const string InputVenueMessageContent::TYPE = "venue";
const string InputContactMessageContent::TYPE = "contact";
const string InputInvoiceMessageContent::TYPE = "invoice";
Couldn't solve some more Errors and decided to use #113 Code Piece... yep, it worked as intended, with My Addendum.
Hello! I'm currently experiencing some Issues with InlineQuery...
My Code:
Errors in Visual Studio:
I don't actually know if My Issue is about My code, to be honest... I tried do anything to fix that, but Issue still persists. Used
tgbot-cpp
Version (via vcpkg): 1.7.3.