❤️🔥🤖✖
| app | ||
| docker-compose.yml | ||
| README.md | ||
affection-x-bot
Creates posts on X from messages on Telegram. Supports images and video but limited to 512mb and 140 seconds.
Getting Started
- Clone the repo
- Open the
appfolder - Rename
sample.envto.env - Set your Telegram Admin ID. This is an integer value representing your main account.
- Enter your Telegram bot token from @botfather
- Enter your Telegram App ID and App Hash from my.telegram.org
- Enter your X username and access/consumer/client credentials from the Developer Portal
Bare Metal
- Type
pip install -r requirements.txtto install dependencies - Follow the instructions below to authenticate with X
- Run by typing
python main.py
Docker
- Run by typing
docker compose up -din the repo's root folder - Enter the docker container by typing
docker exec -it affection-x-bot bash - Follow the instructions below to authenticate with X
- Press CTRL+D to exit the container
X
You will need both v1 and v2 API credentials from the Developer Portal
- Run
python login-to-x.pyto authorize your X account with the bot - Copy the the URL and authorize your X account using a browser
- It will redirect you to a localhost URL. Copy/paste that URL back into the auth script and press enter. It will save your X credentials to the data folder
Telegram
This bot only works for supergroups (public). You will need a bot token from @botfather + a custom app created using my.telegram.org
- Add the bot to your supergroup as admin