summaryrefslogtreecommitdiff
path: root/src/Bot.cpp
blob: 706a3ce07ab5d15ea21da751ca035e2a507fa052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "tgbot/Bot.h"

#include "tgbot/EventBroadcaster.h"

namespace TgBot {

Bot::Bot(std::string token, const HttpClient& httpClient)
    : _token(std::move(token))
    , _api(_token, httpClient)
#if __cplusplus > 201103L
    , _eventBroadcaster(std::make_unique<EventBroadcaster>())
#else
    , _eventBroadcaster(new EventBroadcaster())
#endif
    , _eventHandler(getEvents()) {
}

}