|
qTbot 0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
|
The TelegramArgs class is the base structure for all telegram 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={}, iRequest::RequestPriority priority=iRequest::RequestPriority::NormalPriority) | |
| TelegramArgs main constructor of the message arguments. | |
| QMap< QString, QVariant > | toMap (bool textAsCaption=false) const |
| toMap This method converts all arguments to a 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 the message id callback function. It will be invoked when the request finishes successfully. | |
| iRequest::RequestPriority | requestPriority = iRequest::RequestPriority::NormalPriority |
| requestPriority This is the priority of the request. | |
The TelegramArgs class is the base structure for all telegram message arguments.
Definition at line 20 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 = {}, | ||
| iRequest::RequestPriority | priority = iRequest::RequestPriority::NormalPriority ) |
TelegramArgs main constructor of the message arguments.
| id | This is the id of the target chat or user. |
| text | This is the text of the message. |
| replyToMessageId | This is the id of the message to reply to. |
| parseMode | This is the parse mode of the message. |
| disableWebPagePreview | Disable web page preview when sending links. |
| callBackQueryId | This is the callback query id. |
| msgIdCB | This is the callback function that is invoked with the sent message id. |
| priority | This is the priority of the request. |
Definition at line 11 of file telegramargs.cpp.

| QMap< QString, QVariant > qTbot::TelegramArgs::toMap | ( | bool | textAsCaption = false | ) | const |
toMap This method converts all arguments to a map.
| textAsCaption | This option forces to replace the text key with the caption key. Used in some requests such as sendDocument. |
Definition at line 30 of file telegramargs.cpp.

| QString qTbot::TelegramArgs::callBackQueryId = {} |
Callback query ID. Default: "".
Definition at line 59 of file telegramargs.h.
| QVariant qTbot::TelegramArgs::chatId = {} |
Chat ID where the message will be sent. Default: {}.
Definition at line 53 of file telegramargs.h.
| bool qTbot::TelegramArgs::disableWebPagePreview = false |
Disable web page preview when sending links. Default: false.
Definition at line 77 of file telegramargs.h.
| std::function<void(int msgId)> qTbot::TelegramArgs::msgIdCB = {} |
msgIdCB This is the message id callback function. It will be invoked when the request finishes successfully.
Definition at line 89 of file telegramargs.h.
| QString qTbot::TelegramArgs::parseMode = "html" |
Parse mode of the message. Default: "html".
Definition at line 71 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 65 of file telegramargs.h.
| iRequest::RequestPriority qTbot::TelegramArgs::requestPriority = iRequest::RequestPriority::NormalPriority |
requestPriority This is the priority of the request.
Definition at line 94 of file telegramargs.h.
| QString qTbot::TelegramArgs::text = "" |
Text of the message. Default: "".
Definition at line 47 of file telegramargs.h.