Skip to content

Latest commit

 

History

History

WeatherBot

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Weather Bot

This example shows how to program a Telegram Bot that displays the weather information of a city using the weather api.

Run

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j8
./weather_bot YOUR_BOT_TOKEN WEATHER_API_KEY

How to create a new Bot and obtain its private token ?

  1. Open the Telegram mobile app and search BotFather
  2. Send BotFather a command /newbot
  3. Follow instructions to create a new Bot
  4. After you finish the instructions, you will receive a Bot Token, make sure you keep it secured.

Preview

Preview