Skip to main content

nonebot plugin that can help manage addons folder in valve's game

Project description

NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-addons-manager

✨ 求生之路addons文件夹Q群管理插件 ✨

license pypi python

📖 介绍

这个插件是用来对求生之路服务器上的addons文件夹进行管理,使用此插件可以方便在QQ群中直接进行vpk文件的增删改查,其中除了查询以外的所有操作均需设置插件管理员权限,防止恶意破坏服务器文件夹,如果不想让他人查询服务器上的特定vpk文件,可以将文件后缀设置为VPK,上传vpk文件只需有权限的人将vpk文件传至群文件即可,其余指令请查看下面使用部分

如果觉得插件不错的话请动手点点右上角的star收藏一下

完整搭建QQ群机器人:

  1. 安装nonebot2
  2. 下载插件,下载安装查看下面安装部分
  3. 将nonebot与机器人框架对接,如NapCat,LLOneBot

参考资料:

  1. Python聊天机器人-NoneBot2入门

  1. NoneBot官方文档

  1. LLOneBot官方文档

  1. NapCat官方文档

借鉴了一些下面两个插件的代码与思路:

  1. nonebot-plugin-valve-server-query

  1. nonebot_plugin_l4d2_server

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-addons-manager
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
pip
pip install nonebot-plugin-addons-manager
pdm
pdm add nonebot-plugin-addons-manager
poetry
poetry add nonebot-plugin-addons-manager
conda
conda install nonebot-plugin-addons-manager

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_addons_manager"]

⚙️ 配置

在 nonebot2 项目的.env文件中添加下表中的必填配置

配置项 必填 默认值 说明
destination_path addons文件夹的路径 例:destination_path="/root/Steam/steamapps/common/Left 4 Dead 2 Dedicated Server/left4dead2/addons"
SUPERUSERS 将管理员的QQ添加至列表中,多个管理员用逗号隔开 例:SUPERUSERS=[“123456789”]

🎉 使用

指令表

指令 权限 需要@ 范围 说明
/file 所有人 群聊 查询当前服务器中的所有vpk文件
/rename 插件管理员 群聊/私聊 重命名vpk文件名字,原名字和新名字之间用逗号隔开
/delete 插件管理员 群聊/私聊 删除服务器vpk文件,紧跟需要删除的vpk文件名
插件管理员 群聊 插件管理员直接上传vpk文件,检测到vpk文件之后会自动下载至addons文件夹中

效果图

上传文件

查询文件

修改文件名

删除文件

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_addons_manager-0.1.3.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_addons_manager-0.1.3-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_addons_manager-0.1.3.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_addons_manager-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f54d4578f74c84c872091b49a37f2c99da756f5d61fd8ecde3ca358bfc752d47
MD5 c60b2ce09abcccd784f183973cdb935f
BLAKE2b-256 44f2218f58797de2ab0bdbb5706225ee27c1c1d733b801dcfd7cf26d75b6b9de

See more details on using hashes here.

File details

Details for the file nonebot_plugin_addons_manager-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_addons_manager-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a1a63e1f7952c0a44b0ca6bdc512d2920a6c03d97d1736074b65c4c981d271e5
MD5 172c149a5d34f0e5f0e20590de97eab2
BLAKE2b-256 9dc990b4ec1d83b18ae64fc85312c6fa8a3f95d520af7bcf6533b7cc1a3f1b46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page