Skip to content

Latest commit

 

History

History
55 lines (44 loc) · 1.69 KB

README.md

File metadata and controls

55 lines (44 loc) · 1.69 KB

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.