qTbot 0.89.ee6949a
qTbot is base back end library for your c++ Qt projects.
|
The TelegramArgs class is base structure for the all tellegram message arguments. More...
#include <telegramargs.h>
Public Member Functions | |
TelegramArgs (const QVariant &id, const QString &text="", unsigned long long replyToMessageId=0, const QString &parseMode="html", bool disableWebPagePreview=false, const QString &callBackQueryId="", const std::function< void(int msgId)> &msgIdCB={}) | |
QMap< QString, QVariant > | toMap (bool textAsCaption=false) const |
toMap convert all arguments to the map. | |
Public Attributes | |
QString | text = "" |
Text of the message. Default: "". | |
QVariant | chatId = {} |
Chat ID where the message will be sent. Default: {}. | |
QString | callBackQueryId = {} |
Callback query ID. Default: "". | |
unsigned long long | replyToMessageId = 0 |
ID of the message to which a reply will be given. Default: 0. | |
QString | parseMode = "html" |
Parse mode of the message. Default: "html". | |
bool | disableWebPagePreview = false |
Disable web page preview when sending links. Default: false. | |
std::function< void(int msgId)> | msgIdCB = {} |
msgIdCB This is id message call bak function. Will be inwoked when request finished successful. | |
The TelegramArgs class is base structure for the all tellegram message arguments.
Definition at line 19 of file telegramargs.h.
qTbot::TelegramArgs::TelegramArgs | ( | const QVariant & | id, |
const QString & | text = "" , |
||
unsigned long long | replyToMessageId = 0 , |
||
const QString & | parseMode = "html" , |
||
bool | disableWebPagePreview = false , |
||
const QString & | callBackQueryId = "" , |
||
const std::function< void(int msgId)> & | msgIdCB = {} |
||
) |
Definition at line 11 of file telegramargs.cpp.
QMap< QString, QVariant > qTbot::TelegramArgs::toMap | ( | bool | textAsCaption = false | ) | const |
toMap convert all arguments to the map.
textAsCaption | This option force to replace text key to caption. Used on some requests as a sendDocument |
Definition at line 28 of file telegramargs.cpp.
QString qTbot::TelegramArgs::callBackQueryId = {} |
Callback query ID. Default: "".
Definition at line 46 of file telegramargs.h.
QVariant qTbot::TelegramArgs::chatId = {} |
Chat ID where the message will be sent. Default: {}.
Definition at line 40 of file telegramargs.h.
bool qTbot::TelegramArgs::disableWebPagePreview = false |
Disable web page preview when sending links. Default: false.
Definition at line 64 of file telegramargs.h.
std::function<void(int msgId)> qTbot::TelegramArgs::msgIdCB = {} |
msgIdCB This is id message call bak function. Will be inwoked when request finished successful.
Definition at line 76 of file telegramargs.h.
QString qTbot::TelegramArgs::parseMode = "html" |
Parse mode of the message. Default: "html".
Definition at line 58 of file telegramargs.h.
unsigned long long qTbot::TelegramArgs::replyToMessageId = 0 |
ID of the message to which a reply will be given. Default: 0.
Definition at line 52 of file telegramargs.h.
QString qTbot::TelegramArgs::text = "" |
Text of the message. Default: "".
Definition at line 34 of file telegramargs.h.