The application is a Telegram bot that provides weather updates for cities. Users can subscribe to receive weather updates and get current weather data for specific cities.
This is a Telegram bot that provides weather updates for cities. Users can subscribe to receive weather updates and get current weather data for specific cities.
- Subscribe to weather updates
- Get current weather data for a specific city
- Unsubscribe from weather updates
- Get User's usernames
- Get Usage Statistics
-
Clone the repository:
git clone https://github.com/Rajeshds20/Weather_Telegram_Bot-Complete.git
-
Navigate to the Directory
cd Weather_Telegram_Bot-Complete
-
Open separate terminals for front and backend parts
cd frontend
-
Install the dependencies:
npm install
-
Start the Development server
npm start
cd backend
-
Install the dependencies:
npm install
-
Start the Development server
npm start
-
-
Configure environment variables:
-
Create a
.env
file in the project root directory. -
Add the following environment variables:
BOT_TOKEN=your-telegram-bot-token WEATHER_API_KEY=your-openweathermap-api-key MONGO_URI=your-mongodb-connection-string PORT=your-port-number
-
-
Start the application:
npm start
-
Open Telegram and search for your bot by its username.
-
Start a conversation with the bot and use the available commands.
-
Manage and view the users and statistics in Admin Panel of the Bot
-
In Telegram Bot
/subscribe
- Subscribe to weather updates./unsubscribe
- Unsubscribe from weather updates./weather
- Get the current weather data for a specific city./help
- Display the list of available commands.
- Node.js
- Express.js
- MongoDB
- Telegraf (Telegram Bot Framework)
- Axios (HTTP requests)
- React
- Rajesh
This project is licensed under the MIT License.
Feel free to contribute and make this Telegram bot even better!