17 return rawJson().contains(type);
90 return rawJson().value(
"update_id").toInteger();
94 return rawJson().contains(
"update_id");
const QJsonObject & rawJson() const
rawJson Telegram uses a rest api with json objects. So all received messages are parsed into a json o...
unsigned long long updateId() const override
updateId Returns the update ID.
QJsonObject inlineQueryUpdate() const
inlineQueryUpdate Returns the inline query of this update.
const Type ChosenInlineResultUpdate
ChosenInlineResultUpdate This is the type of a chosen inline result update.
const Type PreCheckuptAueryUpdate
PreCheckuptAueryUpdate This is the type of a pre-checkout query update.
bool isValid() const override
isValid returns true if the update is valid else false.
QSharedPointer< TelegramInlineKeyBoardCallBack > callbackQueryUpdate() const
callbackQueryUpdate Returns the callback query of this update.
QJsonObject preCheckuptAueryUpdate() const
preCheckuptAueryUpdate Returns the pre-checkout query of this update.
const Type CallbackQueryUpdate
CallbackQueryUpdate This is the type of a callback query update.
const Type PollUpdate
PollUpdate This is the type of a poll update.
QJsonObject shippingQueryUpdate() const
shippingQueryUpdate Returns the shipping query of this update.
QSharedPointer< TelegramMsg > editedMessage() const
editedMessage Returns the edited message of this update.
QVariant chatId() const override
chatId This virtual function should return the id of the chat that sent this update to the bot.
QJsonObject editedChannelPost() const
editedChannelPost Returns the edited channel post of this update.
QString Type
Type This is a string value of the telegram update types.
QJsonObject chosenInlineResult() const
chosenInlineResult Returns the chosen inline result of this update.
const Type EditedMessageUpdate
EditedMessageUpdate This is the type of an edited message update.
QJsonObject chatMemberUpdate() const
chatMemberUpdate Returns the chat member of this update.
QJsonObject myChatMemberUpdate() const
myChatMemberUpdate Returns the my chat member of this update.
const Type InlineQueryUpdate
InlineQueryUpdate This is the type of an inline query update.
const Type MyChatMemberUpdate
MyChatMemberUpdate This is the type of a my chat member update.
const Type MessageUpdate
MessageUpdate This is the type of a normal message update.
const Type ChannelPostUpdate
ChannelPostUpdate This is the type of a channel post update.
TelegramUpdate()
TelegramUpdate default constructor.
bool contains(const Type &type) const
contains This method returns true if the update contains the chosen data type.
const Type ChatJoinRequestUpdate
ChatJoinRequestUpdate This is the type of a chat join request update.
QJsonObject channelPost() const
channelPost Returns the channel post of this update.
const Type ShippingQueryUpdate
ShippingQueryUpdate This is the type of a shipping query update.
QJsonObject pollAnswerUpdate() const
pollAnswerUpdate Returns the poll answer of this update.
const Type PollAnswerUpdate
PollAnswerUpdate This is the type of a poll answer update.
QJsonObject chatJoinRequestUpdate() const
chatJoinRequestUpdate Returns the chat join request of this update.
QString from() const override
from This virtual function should return the id of the user that sent this update to the bot.
QJsonObject pollUpdate() const
pollUpdate Returns the poll of this update.
QSharedPointer< TelegramMsg > message() const
message Returns the message of this update.
const Type EditedChannelPostUpdate
EditedChannelPostUpdate This is the type of an edited channel post update.
const Type ChatMemberUpdate
ChatMemberUpdate This is the type of a chat member update.