From 0bf49aa347de2512370c96aef7b5477423f14318 Mon Sep 17 00:00:00 2001 From: Nuno Esculcas Date: Sun, 8 Nov 2020 12:01:39 +0000 Subject: Add support to configure the API bot server url Now creating the bot class it is possible to override the API bot server url that defaults to: 'https://api.telegram.org' This enables you to connect your bot to the local API bot server. --- src/Bot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Bot.cpp') diff --git a/src/Bot.cpp b/src/Bot.cpp index 11bea2c..080b9a2 100644 --- a/src/Bot.cpp +++ b/src/Bot.cpp @@ -8,9 +8,9 @@ namespace TgBot { -Bot::Bot(std::string token, const HttpClient& httpClient) +Bot::Bot(std::string token, const HttpClient& httpClient, const std::string& url) : _token(std::move(token)) - , _api(_token, httpClient) + , _api(_token, httpClient, url) , _eventBroadcaster(std::make_unique()) , _eventHandler(getEvents()) { } -- cgit v1.2.3