summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 8 insertions, 1 deletions
diff --git a/README.md b/README.md
index d20f8fc..83a4ab1 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,14 @@ Simple echo bot which sends everything it receives:
#include <tgbot/tgbot.h>
int main() {
- TgBot::Bot bot("PLACE YOUR TOKEN HERE");
+ TgBot::CurlHttpClient curlHttpClient;
+
+ TgBot::Bot bot(
+ "PLACE YOUR TOKEN HERE",
+ "https://api.telegram.org",
+ curlHttpClient
+ );
+
bot.getEvents().onCommand("start", [&bot](TgBot::Message::Ptr message) {
bot.getApi().sendMessage(message->chat->id, "Hi!");
});