The Weather Bot is a Telegram bot designed to provide weather updates and forecasts to users based on their location. It fetches weather data from the Open-Meteo API and generates visual charts as well as verbal forecasts using ChatGPT.
Subscribe to receive daily weather updates. Unsubscribe from weather updates. Get current weather information on demand. Receive weather updates automatically every day at a specified time.
- Clone the repository:
git clone https://github.com/MrMxffin/1312Bot.git
- Install dependencies:
npm install
- Create a
.env
file and add your Telegram bot token and OpenAI API key:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
OPENAI_API_KEY=your_openai_api_key
OWNER_ID=your_telegram_chat_id
- Start the Bot:
npm start
- To subscribe to weather updates: /subscribe
- To unsubscribe from weather updates: /unsubscribe
- To get current weather information: /get_weather (only available to the bot owner)
- dotenv
- node-telegram-bot-api
- node-cron
- axios
- chartjs-node-canvas
- chatgpt
- fs
Contributions are welcome! Please feel free to open an issue or submit a pull request.License
Unless otherwise stated, all code and original content in this project are released under the Unlicense, read more about this in the License file.
This project utilizes data from external sources, including:
OpenMeteo: Weather data sourced from OpenMeteo is licensed under CC BY 4.0. For more information, visit Open-Meteo. OpenStreetMaps: Location information obtained from OpenStreetMaps is licensed under the Open Data Commons Open Database License (ODbL) by the OpenStreetMap Foundation (OSMF). For more information, visit OpenStreetMap. Please ensure compliance with the respective licenses when using this project.