全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 472|回复: 0
打印 上一主题 下一主题

qbittorrent用tg bot通知

[复制链接]
跳转到指定楼层
1#
发表于 2023-8-25 17:53:29 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
本帖最后由 Fightlee 于 2023-8-25 17:57 编辑

如果你想用tg bot来管理你的qbittorrent的话
可以试下面这两个
https://github.com/zeroone2numeral2/qbittorrent-bot
开源项目:用telegramBot控制qbittorrent
https://loc.xiu.ee/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后面的那串数字
点击保存,就好了
其他的参数自己根据需要调,我只是用来下载时候通知下的
最后效果如图
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-11-6 01:46 , Processed in 0.054630 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表