這個機器人是利用python-telegram-bot
套件所開發
- 輸入指令:
/user
-回傳 userID - 輸入其他訊息則回復
使用方法
cp .env.sample .env
pip3 install --user -r requirements.txt
pyhton3 bot.py
把ExecStart=/usr/bin/python3 /root/tgbot/bot.py
更換為你的專案目錄
cp ./bot.service /lib/systemd/system/
systemctl daemon-reload
systemctl enable bot
systemctl start bot
service bot status