From 8934423853b65d2376e3cbc2bded2adca0b0a0d2 Mon Sep 17 00:00:00 2001 From: fadhil riyanto Date: Sun, 11 Aug 2024 11:54:56 +0700 Subject: update readme Signed-off-by: fadhil riyanto --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 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!"); }); -- cgit v1.2.3