Bot example @nTelegraphUploaderBot
- Python 3.10 and above.
- Systemd or Docker.
Clone this repo via link
git clone https://github.com/nessshon/telegraph-uploader-bot
Go to the project folder
cd telegraph-uploader-bot
Create environment variables file
cp .env.example .env
Edit environment variables in .env
nano .env
-
Install docker and docker compose
-
Build and run your container
docker-compose up -d
-
Create a virtual environment
python3.10 -m venv env
-
Activate virtual environment
source env/bin/activate
-
Install required packages
pip install -r requirements.txt
-
Check if the bot is running
python -m app
-
Set WorkingDirectory to the path to the project folder.
nano telegram-bot.service
-
Copy telegram-bot.service to /lib/systemd/system/
sudo cp telegram-bot.service /lib/systemd/system/telegraph-uploader-bot.service
-
Enable autostart on boot
sudo systemctl enable telegraph-uploader-bot.service
-
Launch Bot
sudo systemctl start telegraph-uploader-bot.service
Variable | Description |
---|---|
BOT_TOKEN | Token, get it from @BotFather |