qTbot 0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
telegraminlinekeyboardcallback.cpp
Go to the documentation of this file.
2
3namespace qTbot {
4
9
11 IJsonBasedObject(jsonObject) {
12
13}
14
15unsigned long long TelegramInlineKeyBoardCallBack::fromId() const {
16 return rawJson()["from"]["id"].toInteger();
17}
18
20 return rawJson()["from"]["is_bot"].toBool();
21}
22
24 return rawJson()["from"]["first_name"].toString();
25}
26
28 return rawJson()["from"]["last_name"].toString();
29}
30
32 return rawJson()["from"]["username"].toString();
33}
34
36 return rawJson()["from"]["language_code"].toString();
37}
38
40 return rawJson()["data"].toString();
41}
42
44 return rawJson()["message"]["message_id"].toVariant();
45}
46}
const QJsonObject & rawJson() const
rawJson Telegram uses a rest api with json objects. So all received messages are parsed into a json o...
IJsonBasedObject()
IJsonBasedObject default constructor.
unsigned long long fromId() const
fromId returns the sender's ID.
TelegramInlineKeyBoardCallBack()
TelegramInlineKeyBoardCallBack default constructor.
QString callBackData() const
callBackData line of the call back that was be clicked.
QString lastName() const
lastName returns the sender's last name.
bool isBot() const
isBot checks if the sender is a bot.
QString languageCode() const
languageCode returns the sender's language code.
QVariant messageId() const
messageId id of the message when was be presed button.
QString username() const
username returns the sender's username.
QString firstName() const
firstName returns the sender's first name.