全球主机交流论坛

标题: qbittorrent用tg bot通知 [打印本页]

作者: Fightlee    时间: 2023-8-25 17:53
标题: qbittorrent用tg bot通知
本帖最后由 Fightlee 于 2023-8-25 17:57 编辑

如果你想用tg bot来管理你的qbittorrent的话
可以试下面这两个
https://github.com/zeroone2numeral2/qbittorrent-bot
开源项目:用telegramBot控制qbittorrent
https://fd.vvwvv.eu.org/thread-1192407-1-1.html
(出处: 全球主机交流论坛)

1
botfather  <https://t.me/BotFather>点击
/newbot命令创建bot,按照提示创建bot的名字和用户名
然后会有一个tokern在Use this token to access the HTTP API:后面,复制下

2获取telgram的user id
https://t.me/getidsbot,点击开始,
id:后面的就是你的id了

3打开qbittorrent设置-下载,拉到下面,运行外部程序

新增 torrent 时运行外部程序
  1. curl -X POST "https://api.telegram.org/bot<YourBotToken>/sendMessage" -d "chat_id=<ChatID>&text=text=%N正在下载."
复制代码

torrent 完成时运行外部程序
  1. curl -X POST "https://api.telegram.org/bot<YourBotToken>/sendMessage" -d "chat_id=<ChatID>&text=text=%N完成下载."
复制代码

<YourBotToken>换成1里面的botfather那里获取的token,<ChatID>换成2里面的id后面的那串数字
点击保存,就好了
其他的参数自己根据需要调,我只是用来下载时候通知下的
最后效果如图





欢迎光临 全球主机交流论坛 (https://fd.vvwvv.eu.org/) Powered by Discuz! X3.4