TelegramBotAPI
TelegramBotAPI copied to clipboard
QVector< InputMediaPhoto> cannot be used
You cannot actually use any of Telegram::Bot::sendMediaGroup methods, because you cannot create such vectors as QVector<InputMediaPhoto> for example.
One can only create such vectors using initializers:
QVector< InputMediaPhoto> v = { InputMediaPhoto(new QFile()), InputMediaPhoto(new QFile()) };
But you cannot add new items to it:
v.emplace_back(InputMediaPhoto(new QFile()) );
Possible solution: const Type type = Type::PHOTO; must be changed to Type type = Type::PHOTO; in the header.
Same for InputMediaVideo
Seems like yet another case of "const members are evil in C++". Basically, the type can not be copied around because it can not copy (write to) a const field.