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"
admin_qq [] 将管理员的QQ添加至列表中,多个管理员用逗号隔开,该值为空即所有人均有权限 例:admin_qq=[1111,2222]

🎉 使用

指令表

指令 权限 需要@ 范围 说明
/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.2.tar.gz (18.8 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.2-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_addons_manager-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1f583dfb89930c13d96f6f92fd5aafd38a05a8c04c827d2a26bdec7d034d587e
MD5 3e14df7ac42732365461be30e6836eb1
BLAKE2b-256 cd73734e13ed075e59840f734ceb8d5d9927274dcfb6177c034ed3c2c1c1589d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_addons_manager-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f9abe4fed45af75f3f3dedec36cef2e3c04ea8d010a743e970264383c2fef2eb
MD5 5f63cf19608710d7d486e11afe542481
BLAKE2b-256 4bd0d0d972be527def88605059f8cf7494aa6cbba3d17f81dc0fb14a36082ee4

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