summaryrefslogtreecommitdiff
path: root/include/tgbot/types/Game.h
blob: 90135f34f9c2e4f4be2fca081632e7a56ab9dac7 (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
58
59
#ifndef TGBOT_GAME_H
#define TGBOT_GAME_H

#include "tgbot/types/MessageEntity.h"
#include "tgbot/types/Animation.h"
#include "tgbot/types/PhotoSize.h"

#include <memory>
#include <string>
#include <vector>

namespace TgBot {

/**
 * @brief This object represents a game.
 *
 * Use BotFather to create and edit games, their short names will act as unique identifiers.
 *
 * @ingroup types
 */
class Game {
public:
    typedef std::shared_ptr<Game> Ptr;

    /**
     * @brief Title of the game.
     */
    std::string title;

    /**
     * @brief Description of the game.
     */
    std::string description;

    /**
     * @brief Photo that will be displayed in the game message in chats.
     */
    std::vector<PhotoSize::Ptr> photo;

    /**
     * @brief Optional. Brief description of the game or high scores included in the game message.
     *
     * Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
     */
    std::string text;

    /**
     * @brief Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
     */
    std::vector<MessageEntity::Ptr> textEntities;

    /**
     * @brief Optional. Animation that will be displayed in the game message in chats. Upload via BotFather.
     */
    Animation::Ptr animation;
};
}

#endif //TGBOT_GAME_H