nonebot-plugin-valve-server-query
Project description
nonebot-plugin-valve-server-query
✨ NoneBot查服插件,可用于查询V社的游戏服务器,支持不同服组的权限配置以及服务器信息在线更新✨
安装
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_valve_server_query-0.5.8.tar.gz.
File metadata
- Download URL: nonebot_plugin_valve_server_query-0.5.8.tar.gz
- Upload date:
- Size: 34.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d48fa6ff20388f1536b45552daa370ac8b033194031d68ddeb03eeddae27981c
|
|
| MD5 |
6899d80d39c9672a9c303befe222c9c1
|
|
| BLAKE2b-256 |
3e53f7874978433622e2904294870136c5d626c390190a6448ac1bd32dfd52cf
|
File details
Details for the file nonebot_plugin_valve_server_query-0.5.8-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_valve_server_query-0.5.8-py3-none-any.whl
- Upload date:
- Size: 34.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a02b4c161f272b3986bbece90ff493f61c4eb93311c5b6283c0b62fa2c9515f4
|
|
| MD5 |
a8761230acb5f453c0d73529fb8d6a28
|
|
| BLAKE2b-256 |
5968706b0e7490b6d568a3ff419634d1d2fe17ebb2a24619ab2045e28d8894d4
|