qTbot 0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
telegramupdateanswer.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
9
10#ifndef TELEGRAMUPDATEANSVER_H
11#define TELEGRAMUPDATEANSVER_H
12
14
15namespace qTbot {
16
20class QTBOT_EXPORT TelegramUpdateAnswer: public IJsonBasedUpdate
21{
22public:
27
28 // iMessage interface
29 bool isValid() const override;
30
35 QJsonValue result() const;
36
41 int errorCode() const;
42
47 QString errorDescription() const;
48
49 QString from() const override;
50 QVariant chatId() const override;
51
52 unsigned long long updateId() const override;
53
54};
55
56}
57#endif // TELEGRAMUPDATEANSVER_H
IJsonBasedUpdate()
IJsonBasedUpdate default constructor.
QVariant chatId() const override
chatId This virtual function should return the id of the chat that sent this update to the bot.
TelegramUpdateAnswer()
TelegramUpdateAnswer default constructor.
unsigned long long updateId() const override
updateId This method returns the numeric id of the update.
QString errorDescription() const
errorDescription This is the text description of what happened.
int errorCode() const
errorCode This is the error code (if it exists).
QJsonValue result() const
result This is the result field of the telegram response.
bool isValid() const override
isValid returns true if the update is valid else false.
QString from() const override
from This virtual function should return the id of the user that sent this update to the bot.