Skip to content

This bot is based on Weather Api website, it's optimized and capable of working with multiple users at the same time.

License

Notifications You must be signed in to change notification settings

reverseCode23932/Telegram-Weather-Api-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Telegram-Weather-Api-Bot

This bot is based on Weather Api website, it's optimized and capable of working with multiple users at the same time.

Features

  • /start — Welcome message
  • /help — Usage instructions and available parameters
  • Weather queries using parameters like city, city_id, zip, lat, lon, lang
  • Async and fast (uses aiohttp and telebot.async_telebot)
  • Logs errors and activity to bot.log

Usage

  1. Clone the repository:

    git clone https://github.com/YOUR_USERNAME/tegbot.git
    cd tegbot
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Set your API keys:

    • Open main.py
    • Replace YOUR_OPENWEATHERMAP_APPID with your OpenWeatherMap API key
    • Replace YOUR_TELEGRAM_BOT_TOKEN with your Telegram Bot token
  4. Run the bot:

    python main.py
    

How to Use

  • Type /start to get a welcome message.
  • Type /help to see usage instructions.
  • To get weather, send a message starting with ! and parameters, for example:
    !city: London, lang: en
    !lat: 55.75, lon: 37.62, lang: ru
    

Available parameters:
city, city_id, zip, lat, lon, lang

Example

!city: Paris, lang: fr

Notes

  • Do not share your API keys or tokens publicly.
  • bot.log is used for logging and should not be committed to the repository.

License

MIT License

About

This bot is based on Weather Api website, it's optimized and capable of working with multiple users at the same time.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages