Skip to content

Weather bot for Telegram Messenger

License

Notifications You must be signed in to change notification settings

mlad/weather-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Bot

Weather bot for Telegram Messenger with multiple APIs and bookmarks support.

Bot UI preview

Features

Usage

  1. Install .NET 8 SDK for your platform
  2. Download the latest release or build it yourself, unpack the archive
  3. Run WeatherBot[.exe], the app will create configuration.json file and exit
  4. Open created configuration file and fill the following properties:
{
  "TelegramBotToken": "", // Telegram bot API token (get from @BotFather)
  "OpenWeatherMap": {
    "ApiToken": "" // Optionally, OpenWeatherMap token (or completely remove "OpenWeatherMap" section)
  },
  "AccuWeather": {
    "ApiToken": "" // Optionally, AccuWeather token (or completely remove "AccuWeather" section)
  }
}
  1. Run the application again. If authorization is successful, console will display "Logged-in as {bot name}"
  2. Send /start or /help to the bot to get list of commands. Share a location to get weather

Building

  1. Install .NET 8 SDK for your platform
  2. In project directory, run dotnet publish ./WeatherBot/WeatherBot.csproj
  3. Binaries will be located in ./WeatherBot/bin/Release/net8.0/publish

Libraries used