Best posts made by Kloping
-
分离式插件(点歌,成语接龙,搜图)
现有 子插件包括
-
点歌的 z2-Lsys-GetSong
-
成语接龙 Lsys-idiom
-
解析图片Lsys-PicParser
-
积分相关操作的1Lsys-Score1
-
积分相关操作的2Lsys-Score2
-
(后续将继续更新)
分离式插件
- 特点
- 功能分离
- 配置齐全
- 扩展方便
快速启动 下载全部jar包放入plugins 即可
请先安装 主插件
详情请见项目地址
-
-
群内飞行棋插件
一个群内飞行棋的插件
玩法: 普通飞行棋玩法 2,4,6点 起飞 同色方块跳跃
其命令:
创建飞行棋 加入飞行棋 #最大四个玩家,最小2个 掷骰子/扔色子 开始游戏 #人数2,3人时使用即可开始游戏 /1 #选择要操作的棋子 下同 /2 /3 /4
配合 chat-command
/flyChess clearTemp # 清除缓存图片 /flyChess overGame # 结束游戏
-
Console 自动定义回复插件
项目地址
https://github.com/Kloping/Mirai_Plugins_Auto_Reply
下载地址
https://github.com/Kloping/Mirai_Plugins_Auto_Reply/releases目前已实现的功能
- 定时消息发送
- 网页管理
- cron 定时消息
- 消息分段发送
- 指定id触发(开关)
-
自定义调用API插件
为了解决众多 网络API 调用 问题
为了减少调用一个API去写代码的操作
于是 我随便写了个 可以通过修改配置的就去调用不同API的插件
自定义 调用 API 插件
表达式
启动后生成配置文件
{ //权限类型 有 console all 当为 console 时只能从命令调用 all 则所有都可以 "permType": "console", //输入 参数分隔符 "splitChar": " ", //网页管理的端口 "port": 20042, //全局代理ip "proxyIp": null, //全局代理port "proxyPort": 0, //网页管理的密码 "passwd": "123456", //api 调用模板 "templates": [ ] }
templates 如何配置
示例涩图配置
{ "permType": "all", "splitChar": " ", "templates": [ { "err": "调用失败", "out": "<Pic:$1>", "outArgs": [ "pic[0]" ], "proxyIp": "", "proxyPort": 0, "sw": true, "touch": "随机图片", "url": "http://api.iw233.cn/api.php?sort=cat&type=json" } ] }
- $1 $2 即参数1 参数2 outArgs 指定返回的 数据为 参数N
- $qid 表示发送者id
- $gid 表示所处群id
转换后内部通过转换成message
见 详情表达式
配置后 在群聊/好友 发送 随机图片 即可触发
复杂的返回参数
<details>
<summary>
以下是 https://api.vvhan.com/api/weather?city=徐州&type=week 该 API 返回的数据
</summary>{ "data": { "yesterday": { "date": "30日星期三", "high": "高温 4℃", "fx": "西南风", "low": "低温 -1℃", "fl": "", "type": "雨夹雪" }, "city": "西安", "forecast": [ { "date": "31日星期四", "high": "高温 7℃", "fengli": "", "low": "低温 -6℃", "fengxiang": "西南风", "type": "小雪" }, { "date": "1日星期五", "high": "高温 7℃", "fengli": "", "low": "低温 -4℃", "fengxiang": "东北风", "type": "多云" }, { "date": "2日星期六", "high": "高温 7℃", "fengli": "", "low": "低温 -3℃", "fengxiang": "西南风", "type": "多云" }, { "date": "3日星期天", "high": "高温 10℃", "fengli": "", "low": "低温 -1℃", "fengxiang": "南风", "type": "多云" }, { "date": "4日星期一", "high": "高温 8℃", "fengli": "", "low": "低温 -3℃", "fengxiang": "东北风", "type": "多云" } ], "ganmao": "昼夜温差很大,易发生感冒,请注意适当增减衣服,加强自我防护避免感冒。", "wendu": "2" }, "status": 1000, "desc": "OK" }
</details>
- 配置后 在群聊/好友 发送 未来天气 <城市名> 即可触发
<details>
<summary>配置文件</summary>{ "permType": "all", "splitChar": " ", "templates": [ { "out": "$1:$2\n$3:$4\n$5:$6\n", "outArgs": [ "data.forecast[0].date", "data.forecast[0].type", "data.forecast[1].date", "data.forecast[1].type", "data.forecast[2].date", "data.forecast[2].type" ], "touch": "未来天气", "url": "https://api.vvhan.com/api/weather?city=$1&type=week", "err": "天气查询失败" } ] }
</details>
最后送上实用配置
<details>
<summary>配置文件</summary>{ "passwd": "123456", "permType": "all", "port": 20042, "proxyIp": null, "proxyPort": 0, "splitChar": " ", "templates": [ { "err": "天气查询失败", "out": "<At:$qid>\n$1:$2\n$3:$4\n$5:$6\n", "outArgs": [ "data.forecast[0].date", "data.forecast[0].type", "data.forecast[1].date", "data.forecast[1].type", "data.forecast[2].date", "data.forecast[2].type" ], "proxyIp": "", "proxyPort": 0, "sw": true, "touch": "未来天气", "url": "https://api.vvhan.com/api/weather?city=$1&type=week" }, { "err": "调用失败", "out": "<Pic:$1>", "outArgs": [ "pic[0]" ], "proxyIp": "", "proxyPort": 0, "sw": true, "touch": "随机图片", "url": "http://api.iw233.cn/api.php?sort=cat&type=json" }, { "err": "调用失败", "out": "<Pic:$1>", "outArgs": [ "$url" ], "proxyIp": "", "proxyPort": 0, "sw": true, "touch": "需要ta吗", "url": "https://ovooa.com/API/face_need/?QQ=$number" }, { "err": "调用失败", "out": "<Pic:$1>", "outArgs": [ "[]" ], "proxyIp": "", "proxyPort": 0, "sw": true, "touch": "快手图集", "url": "http://kloping.top/api/search/parseImgs?url=$1&type=ks" }, { "err": "调用失败", "out": "<Pic:$1>", "outArgs": [ "data.[]" ], "proxyIp": "", "proxyPort": 0, "sw": true, "touch": "堆糖搜图", "url": "http://kloping.top/api/search/pic?keyword=$1&num=3&type=duit" }, { "err": "调用失败", "out": "<Music:KugouMusic,$1,$2,https://www.kugou.com/,$3,$4>", "outArgs": [ "data[0].media_name", "data[0].author_name", "data[0].imgUrl", "data[0].songUrl" ], "proxyIp": "", "proxyPort": 0, "sw": true, "touch": "酷狗点歌", "url": "http://kloping.top/api/search/song?keyword=$1&type=kugou&n=2" }, { "err": null, "out": "<At:$qid>\n$1", "outArgs": [ "$all" ], "proxyIp": "", "proxyPort": 0, "sw": true, "touch": "/ping", "url": "https://xian.txma.cn/API/sping.php?url=$1" }, { "err": null, "out": "id:$1\n来自群$2\n的$3\n时间:$call(http://kloping.top/stamp2time?stamp=$4&time=)\n昵称:$5\n信息:$6\n剩余捡起次数:$7", "outArgs": [ "id", "gid", "sid", "time", "name", "message", "state" ], "proxyIp": "", "proxyPort": 0, "sw": true, "touch": "/捡瓶子", "url": "http://kloping.top/api/pickUpBottle" } ] }
</details>
更多 帮助请查看 releases
由于部分API不提供服务 造成的报错请手动访问API后确定是否为该插件的问题