summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorfadhil riyanto <me@fadev.org>2024-08-11 11:54:56 +0700
committerfadhil riyanto <me@fadev.org>2024-08-11 11:54:56 +0700
commit8934423853b65d2376e3cbc2bded2adca0b0a0d2 (patch)
tree9dc4d059595ecaaa4bec3efaed97958e48fbd32f /README.md
parent47f5f69f1df08d030e57f81f87024146372a2ce0 (diff)
update readme
Signed-off-by: fadhil riyanto <me@fadev.org>
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!");
});