Skip to main content

NoneBotPluginLogo

nonebot-plugin-game-torrent

⭐基于Nonebot2的获取游戏种子插件⭐


⭐ 介绍

为用户在线提供游戏种子资源

📜 免责声明

💿 安装

安装

pip 安装

pip install nonebot-plugin-game-torrent
  • 在nonebot的pyproject.toml中的plugins = ["xxx"]添加此插件

nb-cli安装

nb plugin install nonebot-plugin-game-torrent -U

git clone安装(不推荐)

  • 命令窗口cmd下运行
git clone https://github.com/Cvandia/nonebot-plugin-game-torrent
  • 在窗口运行处 将文件夹nonebot-plugin-torrent-game复制到bot根目录下的src/plugins(或创建bot时的其他名称xxx/plugins)
注意

推荐镜像站下载

清华源https://pypi.tuna.tsinghua.edu.cn/simple

阿里源https://mirrors.aliyun.com/pypi/simple/

开发

开发环境需要 Python 3.10+ 和 uv。

git clone https://github.com/Cvandia/nonebot-plugin-game-torrent
cd nonebot-plugin-game-torrent
uv sync --locked --all-groups

常用命令:

# 运行代码检查
uv run ruff check .
# 运行测试
uv run --all-groups pytest -q
# 构建源码包和 wheel
uv build
# 添加依赖(同时更新 pyproject.toml 和 uv.lock)
uv add <package>
# 更新锁定的依赖版本
uv lock --upgrade

请将 uv.lock 提交到版本控制中,以保持开发和 CI 的依赖一致。

⚙️ 配置

当前源由 nonebot-plugin-localstore 管理,保存至插件配置目录中的 game_torrent.text,启动时读取,正常关闭时保存;源选择仍由整个机器人共享。 可通过 localstore 的 LOCALSTORE_CONFIG_DIR 或 LOCALSTORE_PLUGIN_CONFIG_DIR 配置存储位置,详见 localstore 文档。 升级时,若新位置没有配置,会自动读取旧的 ./config/game_torrent.text 并迁移, 保留原文件;已有新配置优先。

在env.中添加以下配置

配置 类型 必填项 默认值 说明
torrent_send_format str 否 "game: {game_name}\nsize: {size}\nlast_update: {last_update}\nmagnet: {magnet}\n" 默认发送的格式
magnet_to_qrcode bool 否 False 是否将magnet链接转换为二维码

⭐ 使用

指令:

注: 以下命令均为command触发,实际需要在命令前加上command_start

指令 需要内容 范围 说明 权限
游戏搜索 是 群聊、私聊 搜索游戏种子 所有人
种子源 否 群聊、私聊 管理种子源 所有人

示例:

可用源:1. Aimhaven、2. Fitgirl、3. 123资源库。 使用 /种子源 show 查看当前源,使用 /种子源 change 3 切换到 123资源库, 然后通过 /游戏搜索 奥日 搜索(123资源库支持中文关键词)。

123资源库返回正文中的公开磁力链接或网盘分享链接;网盘链接沿用输出中的 magnet 字段,也支持二维码发送。仅返回第一个可用资源链接,不解析网盘跳转, 也不自动下载文件;页面没有提供的大小或更新时间显示为 Unknown。

  • /游戏搜索 赛博朋克2077
  • /搜索游戏 艾尔登法环
  • /种子源 show
  • /源 change 1

🌙 未来

  • 获取种子链接供下载
  • 链接转二维码
  • 上传群文件
  • 配置下载种子文件路劲 - [ ] 添加更多种子获取网站
  • 添加Aimhaven的种子获取
喜欢记得点个star⭐

💝 特别鸣谢

  • nonebot2: 本项目的基础,非常好用的聊天机器人框架。

Metadata

Release files for nonebot-plugin-game-torrent 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nonebot-plugin-game-torrent 0.2.5
File Size Uploaded
nonebot_plugin_game_torrent-0.2.5.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-game-torrent 0.2.5
File Interpreter ABI Platform
nonebot_plugin_game_torrent-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 28.5 kB

Release files / nonebot_plugin_game_torrent-0.2.5.tar.gz

Download URL nonebot_plugin_game_torrent-0.2.5.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8eaeef864fabdcec952a3e7308532809ba41c451e02a6166241c611a2e639157
BLAKE2b-256 checksum
How to use checksums
54c3185a7decd69c350287a69d26c11141e60426e22e8656dfe5b6995baea416
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / nonebot_plugin_game_torrent-0.2.5-py3-none-any.whl

Download URL nonebot_plugin_game_torrent-0.2.5-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63065cd4f3e4c19e01d1a42d6259e382194ce6155e3bc43193c824cdd458767d
BLAKE2b-256 checksum
How to use checksums
4b9399ec7f1feeebe9ae56bb0e3ac57532fb4202327f0f95f529a5005f8fb3e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page