qTbot
0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
Toggle main menu visibility
telegramargs.h
Go to the documentation of this file.
1
//#
2
//# Copyright (C) 2023-2026 QuasarApp.
3
//# Distributed under the GPLv3 software license, see the accompanying
4
//# Everyone is permitted to copy and distribute verbatim copies
5
//# of this license document, but changing it is not allowed.
6
//#
7
8
#ifndef TELEGRAMARGS_H
9
#define TELEGRAMARGS_H
10
11
#include <QVariant>
12
#include "global.h"
13
#include "
irequest.h
"
14
15
namespace
qTbot
{
16
20
struct
QTBOT_EXPORT
TelegramArgs
21
{
33
TelegramArgs
(
const
QVariant&
id
,
34
const
QString&
text
=
""
,
35
unsigned
long
long
replyToMessageId
= 0,
36
const
QString&
parseMode
=
"html"
,
37
bool
disableWebPagePreview
=
false
,
38
const
QString&
callBackQueryId
=
""
,
39
const
std::function<
void
(
int
msgId)>&
msgIdCB
= {},
40
iRequest::RequestPriority
priority =
iRequest::RequestPriority::NormalPriority
41
);
42
47
QString
text
=
""
;
48
53
QVariant
chatId
= {};
54
59
QString
callBackQueryId
= {};
60
65
unsigned
long
long
replyToMessageId
= 0;
66
71
QString
parseMode
=
"html"
;
72
77
bool
disableWebPagePreview
=
false
;
78
84
QMap<QString, QVariant>
toMap
(
bool
textAsCaption =
false
)
const
;
85
89
std::function<void(
int
msgId)>
msgIdCB
= {};
90
94
iRequest::RequestPriority
requestPriority
=
iRequest::RequestPriority::NormalPriority
;
95
};
96
97
}
98
#endif
// TELEGRAMARGS_H
qTbot::iRequest::RequestPriority
RequestPriority
The RequestPriority enum This is the list of request execution priorities on the client side.
Definition
irequest.h:61
qTbot::iRequest::NormalPriority
@ NormalPriority
NormalPriority the request has a normal priority. This is the default value.
Definition
irequest.h:73
irequest.h
qTbot
Definition
telegramdeletemessage.cpp:8
qTbot::TelegramArgs::callBackQueryId
QString callBackQueryId
Callback query ID. Default: "".
Definition
telegramargs.h:59
qTbot::TelegramArgs::disableWebPagePreview
bool disableWebPagePreview
Disable web page preview when sending links. Default: false.
Definition
telegramargs.h:77
qTbot::TelegramArgs::toMap
QMap< QString, QVariant > toMap(bool textAsCaption=false) const
toMap This method converts all arguments to a map.
Definition
telegramargs.cpp:30
qTbot::TelegramArgs::requestPriority
iRequest::RequestPriority requestPriority
requestPriority This is the priority of the request.
Definition
telegramargs.h:94
qTbot::TelegramArgs::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.
Definition
telegramargs.cpp:11
qTbot::TelegramArgs::parseMode
QString parseMode
Parse mode of the message. Default: "html".
Definition
telegramargs.h:71
qTbot::TelegramArgs::replyToMessageId
unsigned long long replyToMessageId
ID of the message to which a reply will be given. Default: 0.
Definition
telegramargs.h:65
qTbot::TelegramArgs::msgIdCB
std::function< void(int msgId)> msgIdCB
msgIdCB This is the message id callback function. It will be invoked when the request finishes succes...
Definition
telegramargs.h:89
qTbot::TelegramArgs::chatId
QVariant chatId
Chat ID where the message will be sent. Default: {}.
Definition
telegramargs.h:53
qTbot::TelegramArgs::text
QString text
Text of the message. Default: "".
Definition
telegramargs.h:47
src
qTbot
src
public
qTbot
telegramargs.h
Generated by
1.18.0