/telegram_crypto_currency

Бот Telegram курс крипты для паблика

Primary LanguagePythonMIT LicenseMIT

Telegram auto posting cryptocurrency from CoinMarketCap websoket

python 3.11 open issues closed issues Telegram Support me

Features ⚙️

  • Edit a post in telegram channel every 5 seconds

Getting Started 🚀

Expand to see guide for Linux (Ubuntu)
  • Step 1: Clone the repository using command:
git clone https://github.com/zdky/telegram_crypto_currency.git
  • Step 2: Open project folder:
cd tgbot
  • Step 0: Edit app.py with your data:
tg_token = 'YOUR_TOKEN'
tg_public_id = 1382779547
tg_post_id = 12
  • Step 3: Check your python version:
python3.11 --version

If your version is below 3.11, install python:

apt install software-properties-common -y
add-apt-repository "ppa:deadsnakes/ppa" -y
apt update && apt install python3.11 python3.11-venv
  • Step 4: Create virtual environment:
python3.11 -m venv .
  • Step 5: Run virtual environment:
source bin/activate
  • Step 6: Install requirements:
pip install -r requirements.txt
  • Step 7: Grant rights:
chmod +x app.py
  • Step 8: Create service:
nano /etc/systemd/system/tgbot.service
  • Step 9: Put in file tgbot.service:
[Unit]
Description=tg_bot
After=syslog.target
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/root/tgbot
ExecStart=/root/tgbot/bin/python3.11 /root/tgbot/app.py
RestartSec=5
Restart=always

[Install]
WantedBy=multi-user.target

Save and exit:

CTRL+O > Enter > CTRL+X
  • Step 10: Start service:
systemctl enable tgbot.service
systemctl start tgbot.service

Expand to see guide for debug on Linux (Ubuntu)
  • Debug: Check status service:
systemctl status tgbot
  • Debug: Check program logs:
journalctl -u tgbot.service
  • Debug: Reload service:
systemctl reload-or-restart tgbot.service
  • Stop program:
systemctl stop tgbot.service

Reporting Bugs 🕵

If you've found something that doesn't work as it should, or would like to suggest a new feature, then go ahead and raise a ticket on GitHub. For bugs, please outline the steps needed to reproduce, and include relevant info like system info and resulting logs.

Raise an Issue

License

zdky/telegram_crypto_currency is licensed under MIT © zdky 2024.
For information, see TLDR Legal > MIT