电报关键字提醒机器人 telegram keyword alert tgbot 抢 Hax US-OpenVZ
白嫖 Hax Woiden 的人们都想抢一下
那么可以用关键字提醒机器人。
GitHub: https://github.com/crazypeace/keyword_alert_bot
先看疗效
搭建步骤
得到电报开发 API
* 建议创建一个新的电报账户,以防万一机器人的运行影响你的常用电报账户。
得到 api_id, api_hash
创建机器人
/start
/newbot
输入
输入
得到 token to access the HTTP API
运行环境
准备 python 相关组件
* 基于
apt updateapt install -y pippip install telethon peewee PySocks diskcache PyYAML asyncstdlib
从 GitHub 拉程序文件
获得压缩包地址
cdwget -N https://github.com/crazypeace/keyword_alert_bot/archive/refs/heads/master.zipunzip master.zipcd keyword_alert_bot-master/
配置文件 config.yml
修改如下字段
phone 改为你的新
username 改为你的新
第一次运行 bot
python3 ./main.py
脚本窗口提示你输入验证码,同时,你的新
将这个验证码输入到脚本窗口
长期运行 bot
用
apt install -y screenscreenpython3 ./main.py
用
crontab -e
第一次运行会提示你用哪个编辑器,选你喜欢的就好,小白推荐用
输入下面这行再保存
@reboot ( sleep 120 ; python3 /etc/keyword_alert_bot-master/main.py )
意思是每次重启后,等待
实际使用
1. 加入机器人以后,一开始要先输入 /start,此后机器人才会处理进一步的命令。
* 如果你想机器人为你专用,也是可以的哦。详见
2. 需要关注的关键字是 US,BEST
需要关注的频道是 https://t.me/hax_seats,https://t.me/hax_server
那么就输入
/subscribe US,BEST https://t.me/hax_seats,https://t.me/hax_server
或者
/subscribe US,BEST hax_seats,hax_server
就可以啦~
评论
发表评论