Skip to main content

nonebot-plugin-valve-server-query

Project description

nonebot

nonebot-plugin-valve-server-query

✨ NoneBot查服插件,可用于查询V社的游戏服务器,支持不同服组的权限配置以及服务器信息在线更新✨

license pypi python

安装

nb-cli

nb plugin install nonebot_plugin_valve_server_query

pip

pip install nonebot_plugin_valve_server_query

git(单独安装)

git clone https://github.com/LiLuo-B/nonebot-plugin-valve-server-query.git
source .venv/bin/activate
pip install poetry
poetry install

配置

.env|.env.prod|.env.dev

配置项 必填 默认值 说明
a2s_path "./data/valve" 你的数据文件路径(包含权限配置与服务器信息)
a2s_ip False 是否将输出的域名转换为数字IP(防止动态公网IP暴露域名)
a2s_mask_name False 是否屏蔽玩家名字(防止玩家名字违规被举报封号)

权限配置

用于服务器信息更新相关命令,文件位于a2s_path/authority.json,key为组名,value为拥有该组权限的QQ号列表

示例

{
    "测试": [
        "123456789",
        "987654321"
    ],
    "test": [
        "11111111"
    ]
}

服务器信息批量添加配置

只需将json文件发送给机器人即可

示例

{
    "组名": [
        {
            "id": 1,
            "ip": "127.0.0.1:25535"
        },
        {
            "id": 2,
            "ip": "127.0.0.1:25536"
        }
    ],
    "测试": [
        {
            "id": 1,
            "ip": "127.0.0.1:25535"
        }
    ]
}

使用

指令 权限 相关参数
a2s添加 详见权限配置 若用户仅一个组有权限,需要提供:id ip port,若用户有多个组的权限需要提供:组名 id ip port
a2s更新 详见权限配置 若用户仅一个组有权限,需要提供:id ip port,若用户有多个组的权限需要提供:组名 id ip port
a2s删除 详见权限配置 若用户仅一个组有权限,需要提供:id ,若用户有多个组的权限需要提供:组名 id
a2s列表 需要提供:组名,返回该组收录的所有ip:port
connect 需要提供:ip:port,返回服务器信息
组名 不加参数返回该组所有服务器信息,加id返回该服信息

示例

查组

查服

json快捷更新

服务器添加

对多个组都有权限时

仅对一个组有权限时

服务器更新

对多个组都有权限时

仅对一个组有权限时

服务器删除

对多个组都有权限时

仅对一个组有权限时

服务器ip列表

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_valve_server_query-0.5.8.tar.gz (34.2 MB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file nonebot_plugin_valve_server_query-0.5.8.tar.gz.

File metadata

File hashes

Hashes for nonebot_plugin_valve_server_query-0.5.8.tar.gz
Algorithm Hash digest
SHA256 d48fa6ff20388f1536b45552daa370ac8b033194031d68ddeb03eeddae27981c
MD5 6899d80d39c9672a9c303befe222c9c1
BLAKE2b-256 3e53f7874978433622e2904294870136c5d626c390190a6448ac1bd32dfd52cf

See more details on using hashes here.

File details

Details for the file nonebot_plugin_valve_server_query-0.5.8-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_valve_server_query-0.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a02b4c161f272b3986bbece90ff493f61c4eb93311c5b6283c0b62fa2c9515f4
MD5 a8761230acb5f453c0d73529fb8d6a28
BLAKE2b-256 5968706b0e7490b6d568a3ff419634d1d2fe17ebb2a24619ab2045e28d8894d4

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