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.
- Sends custom messages to a personal chat or Telegram channel.
- Uses the Telegram Bot API to interact with Telegram.
- Python 3.7+
- Telegram Bot Token
- Python Libraries:
python-telegram-bot
python-dotenv
asyncio
-
Clone the repository :
git clone https://github.com/cambridgeitcollege/TelegramBot.git cd TelegramBot
-
Set up a virtual environment (optional but recommended) :
python3 -m virtualenv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies :
pip install -r requirements.txt
-
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.
-
Run the Script :
python3 main.py
We welcome contributions! If you'd like to contribute to this Mero Share IPO Filler Script, please check out our Contribution Guidelines.
Please review our Code of Conduct before participating in this Script.
This project is licensed under the MIT License.