summaryrefslogtreecommitdiff
path: root/include/tgbot/types/CallbackQuery.h
blob: b1367aac3d4d178de4c831ebb1892da55d33cdaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef TGBOT_CALLBACKQUERY_H
#define TGBOT_CALLBACKQUERY_H

#include "tgbot/types/User.h"
#include "tgbot/types/Message.h"

#include <memory>
#include <string>

namespace TgBot {

/**
 * @brief This object represents an incoming callback query from a callback button in an inline keyboard.
 * @ingroup types
 */
class CallbackQuery {
public:
    typedef std::shared_ptr<CallbackQuery> Ptr;

    /**
     * @brief Unique identifier for this query.
     */
    std::string id;

    /**
     * @brief Sender.
     */
    User::Ptr from;

    /**
     * @brief Optional. Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old.
     */
    Message::Ptr message;

    /**
     * @brief Optional. Identifier of the message sent via the bot in inline mode, that originated the query.
     */
    std::string inlineMessageId;

    /**
     * @brief Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
     */
    std::string chatInstance;

    /**
     * @brief Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.
     */
    std::string data;

    /*
     * @brief Optional. Short name of a Game to be returned, serves as the unique identifier for the game
     */
    std::string gameShortName;
};
}

#endif //TGBOT_CALLBACKQUERY_H