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.1.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.1-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_addons_manager-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d8935c1c09c652cc104f19637c3062df14c88b4132d829418043b09c1da8cebc
MD5 b0a515d6822a3bf34e0cb3d484ab48ba
BLAKE2b-256 9efccaed05cbc989a3b2cafd60e895d94dafa9494e5e12f17e55f8a865953627

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nonebot_plugin_addons_manager-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f7aa06f014013adc06c5488165a3e0dd396d71f3a21cc5556bb428dbc1bff8c
MD5 136feb4d728d1b99d8b6f40310f7c286
BLAKE2b-256 bc04f2e3113fbbe03c3c5e49a152058f4b044cd5fd3acddf9fba4177d414c771

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