Skip to content

The Telegram News Bot is a Python-based bot that delivers the latest news directly to your Telegram chat. It leverages the Telegram Bot API and the NewsAPI to fetch and provide current news headlines from various sources. This bot is ideal for users who want to stay updated with the latest news in a convenient and automated manner.

License

Notifications You must be signed in to change notification settings

GN-SR/Telegram-news-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Telegram News Bot

This is a Telegram bot that fetches the latest news and sends it directly to your chat. It is designed to keep you updated with real-time news from various sources, delivered straight to your Telegram app.

Features

  • Fetches the latest news from popular APIs (e.g., NewsAPI, RSS feeds, etc.).
  • Simple and user-friendly commands to get the news directly.
  • Sends news summaries with headlines, descriptions, and links for full articles.

Prerequisites

Before running the bot, ensure you have the following:

  • Python 3.8 or higher installed.
  • A Telegram account and a bot token from BotFather.
  • An API key from a news provider (e.g., NewsAPI).

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/telegram-news-bot.git
    cd telegram-news-bot
  2. Install the required Python dependencies:

    pip install -r requirements.txt
  3. Configure your bot by creating a .env file in the project directory and adding the following:

    BOT_TOKEN=your_telegram_bot_token
    NEWS_API_KEY=your_news_api_key
  4. Run the bot:

    python main.py

Usage

  • Start the bot by searching for it in Telegram and clicking "Start."
  • Use the following commands to interact with the bot:
    • /start - Get a welcome message and available commands.
    • /news [category] - Fetch news in the specified category (e.g., /news technology).
    • /help - Display the help message.

Project Structure

telegram-news-bot/
│
├── main.py                # Main script to run the bot
├── requirements.txt      # Python dependencies
├── .env                  # Configuration file (not included in the repo)
└── README.md             # Project documentation

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements


Happy coding! 🎉

About

The Telegram News Bot is a Python-based bot that delivers the latest news directly to your Telegram chat. It leverages the Telegram Bot API and the NewsAPI to fetch and provide current news headlines from various sources. This bot is ideal for users who want to stay updated with the latest news in a convenient and automated manner.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages