Skip to content

Telegram Bot written in Python that Sends the Message to the Channel .

License

Notifications You must be signed in to change notification settings

cambridgeitcollege/TelegramBot

Repository files navigation

Telegram Bot Message Sender

This Python script allows you to send a message to a personal chat or channel using a Telegram bot. It utilizes the python-telegram-bot library to interact with Telegram's API asynchronously.

Features

  • Sends custom messages to a personal chat or Telegram channel.
  • Uses the Telegram Bot API to interact with Telegram.

Requirements

  • Python 3.7+
  • Telegram Bot Token
  • Python Libraries:
    • python-telegram-bot
    • python-dotenv
    • asyncio

Usages

  1. Clone the repository :

    git clone https://github.com/cambridgeitcollege/TelegramBot.git
    cd TelegramBot
  2. Set up a virtual environment (optional but recommended) :

    python3 -m virtualenv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies :

    pip install -r requirements.txt
  4. Set up the environment variables :

    • Create a .env file in the root of the script by the following command:
    cp .env.example .env
    • You can obtain the BOTAPIKEY by creating a bot via BotFather on Telegram.
    • To get your CHATID, start a conversation with your bot and use the provided script to get the chat ID.
  5. Run the Script :

    python3 main.py

Contributing

We welcome contributions! If you'd like to contribute to this Mero Share IPO Filler Script, please check out our Contribution Guidelines.

Code of Conduct

Please review our Code of Conduct before participating in this Script.

License

This project is licensed under the MIT License.

About

Telegram Bot written in Python that Sends the Message to the Channel .

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages