Merge branch 'master' into dev
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo
|
||||
echo -e "\e[1;36m-----------使用GitMoji-cli编辑提交------------\e[0m"
|
||||
echo " 遵循 Gitmoji"
|
||||
echo " https://gitmoji.dev/"
|
||||
echo -e "\e[1;36m----------------------------------------------\e[0m"
|
||||
|
||||
exec < /dev/tty
|
||||
pnpm gitmoji --hook $1 $2
|
||||
@@ -3,6 +3,7 @@
|
||||
* 优化发好友、发群聊
|
||||
* 消息为空后可单独发送,以支持更多消息类型
|
||||
* 新增`#ocr`命令ⁿᵉʷ
|
||||
* 移除`#参考面板` `#收益曲线`功能
|
||||
* 修复同意回复
|
||||
|
||||
# 1.4.6
|
||||
|
||||
@@ -45,9 +45,9 @@ pnpm husky
|
||||
|
||||
```sh
|
||||
git add .
|
||||
git commit
|
||||
pnpm run commit
|
||||
```
|
||||
在提交时,Husky 会自动运行预定义的 Git 钩子脚本,包括对代码规范的检测。
|
||||
在提交时,Husky 会自动运行预定义的 Git 钩子脚本,包括对代码规范的检测,同时会使用[gitmoji-cli](https://github.com/carloscuesta/gitmoji)进行交互式提交。
|
||||
|
||||
3. 如果提交的代码不符合项目的规范要求,您将会收到相应的错误提示。请根据提示信息进行修改和调整,直到提交的代码符合要求。
|
||||
|
||||
|
||||
10
README.md
10
README.md
@@ -128,20 +128,12 @@ Tip:具体可使用 **#椰奶设置** 查看
|
||||
|
||||
- [x] 随机唱鸭
|
||||
|
||||
- [x] 角色收益曲线
|
||||
|
||||
- [x] 赞我(支持陌生人点赞)
|
||||
|
||||
- [x] coser
|
||||
|
||||
- [x] 铃声搜索
|
||||
|
||||
- [x] 支付宝到账语音
|
||||
|
||||
- [x] 半次元话题
|
||||
|
||||
- [x] 哪个叼毛是龙王
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary>Pixiv功能</summary>
|
||||
@@ -199,6 +191,8 @@ Tip:详情请参考[此教程](https://docs.qq.com/doc/p/108e5d788607d988ac62e
|
||||
|
||||
- [ ] 黑名单
|
||||
|
||||
- [x] 哪个叼毛是龙王
|
||||
|
||||
Tip:具体可使用 **#椰奶群管帮助** 查看
|
||||
</details>
|
||||
|
||||
|
||||
112
apps/nga.js
112
apps/nga.js
@@ -1,112 +0,0 @@
|
||||
import plugin from "../../../lib/plugins/plugin.js"
|
||||
import fs from "node:fs"
|
||||
import common from "../../../lib/common/common.js"
|
||||
import { Data, Plugin_Path } from "../components/index.js"
|
||||
import { incomeCurve } from "../constants/nga.js"
|
||||
|
||||
let gsCfg
|
||||
try {
|
||||
gsCfg = (await import("../../genshin/model/gsCfg.js")).default
|
||||
} catch (err) {}
|
||||
|
||||
export class NGA extends plugin {
|
||||
constructor() {
|
||||
super({
|
||||
name: "椰奶NGA",
|
||||
dsc: "收益曲线",
|
||||
event: "message",
|
||||
priority: 500,
|
||||
rule: [
|
||||
{
|
||||
reg: "^#?(更新)?(.*)(收益曲线|参考面板)(帮助)?$",
|
||||
fnc: "NGA"
|
||||
}
|
||||
]
|
||||
})
|
||||
this.incomeCurvePath = `${Plugin_Path}/temp/incomeCurve`
|
||||
this.referencePanelPath = `${Plugin_Path}/temp/referencPanel`
|
||||
this.incomeCurveObj = incomeCurve
|
||||
}
|
||||
|
||||
// 初始化
|
||||
async initFolder(type) {
|
||||
Data.createDir(`data/${type == "收益曲线" ? "incomeCurve" : "referencPanel"}`)
|
||||
}
|
||||
|
||||
async NGA() {
|
||||
let role = {}
|
||||
let regRet = this.e.msg.match("^#?(更新)?(.*)(收益曲线|参考面板)(帮助)?$")
|
||||
if (regRet[4]) {
|
||||
role.name = "帮助"
|
||||
} else {
|
||||
if (!gsCfg) return false
|
||||
role = gsCfg.getRole(regRet[2])
|
||||
}
|
||||
|
||||
if (!role) return logger.error(`${this.e.logFnc}未找到该角色`, role)
|
||||
|
||||
let type = regRet[3]
|
||||
/** 主角特殊处理 */
|
||||
if ([ "10000005", "10000007", "20000000" ].includes(String(role.roleId))) {
|
||||
if (![ "风主", "岩主", "雷主", "草主" ].includes(role.alias)) {
|
||||
await this.e.reply(`请选择:风主${type}、岩主${type}、雷主${type}、草主${type}`)
|
||||
return
|
||||
} else {
|
||||
role.name = role.alias
|
||||
}
|
||||
}
|
||||
|
||||
let imgList = []
|
||||
|
||||
if (type == "收益曲线") {
|
||||
// 收益曲线
|
||||
if (!this.incomeCurveObj[role.name]) {
|
||||
return this.e.reply("暂时无该角色收益曲线~>_<")
|
||||
}
|
||||
let urls = this.incomeCurveObj[role.name]
|
||||
|
||||
if (Array.isArray(urls)) {
|
||||
urls.forEach((item, index) => imgList.push({
|
||||
url: item,
|
||||
imgPath: `${this.incomeCurvePath}/${role.name}_${index + 1}.png`
|
||||
}))
|
||||
} else {
|
||||
imgList.push({
|
||||
url: urls,
|
||||
imgPath: `${this.incomeCurvePath}/${role.name}.png`
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// 参考面板
|
||||
imgList.push({
|
||||
url: `https://gitlab.com/yeyang52/referenc-profile/-/raw/master/image/${role.name}.png`,
|
||||
imgPath: `${this.referencePanelPath}/${role.name}.png`
|
||||
})
|
||||
}
|
||||
|
||||
for (const item of imgList) {
|
||||
// 检测图片并下载图片
|
||||
if (!fs.existsSync(item.imgPath) || regRet[1]) {
|
||||
this.initFolder(type)
|
||||
await this.getImg(item.url, item.imgPath)
|
||||
}
|
||||
// 发送图片
|
||||
if (fs.existsSync(item.imgPath)) {
|
||||
await this.e.reply(segment.image(item.imgPath))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 下载图片
|
||||
async getImg(name, Path) {
|
||||
logger.mark(`${this.e.logFnc} 下载${name}素材图`)
|
||||
|
||||
if (!await common.downFile(name, Path)) {
|
||||
return false
|
||||
}
|
||||
|
||||
logger.mark(`${this.e.logFnc} 下载${name}素材成功`)
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -196,20 +196,6 @@ export const helpList = [
|
||||
group: "娱乐功能",
|
||||
list: [
|
||||
{
|
||||
icon: 7,
|
||||
title: "#椰羊收益曲线",
|
||||
desc: "查看角色收益曲线"
|
||||
},
|
||||
{
|
||||
icon: 13,
|
||||
title: "#椰羊参考面板",
|
||||
desc: "查看角色参考面板"
|
||||
},
|
||||
{
|
||||
icon: 9,
|
||||
title: "#收益曲线帮助",
|
||||
desc: "=-="
|
||||
}, {
|
||||
icon: 20,
|
||||
title: "#唱歌",
|
||||
desc: "随机唱鸭"
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
export const incomeCurve = {
|
||||
帮助: "https://img.nga.178.com/attachments/mon_202208/21/i2Qjk1-j5voXxZ96T3cS1di-q9.png",
|
||||
烟绯: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-gz71XxZ96T3cS1di-q9.png",
|
||||
辛焱: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-1uboXyZ9cT3cS1di-q9.png",
|
||||
宵宫: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-acsfXyZ9eT3cS1di-q9.png",
|
||||
香菱: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-akwxXwZ8wT3cS1di-q9.png",
|
||||
托马: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-in5cXwZ90T3cS1di-q9.png",
|
||||
胡桃: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-6vbsXvZ8pT3cS1di-q9.png",
|
||||
迪卢克: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-dgbbXxZ92T3cS1di-q9.png",
|
||||
安柏: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-8m6vXxZ91T3cS1di-q9.png",
|
||||
夜兰: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-3oq4XxZ95T3cS1di-q9.png",
|
||||
行秋: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-b18cXwZ91T3cS1di-q9.png",
|
||||
神里绫人: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-hyagXyZ9fT3cS1di-q9.png",
|
||||
珊瑚宫心海: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-3ktjXxZ9bT3cS1di-q9.png",
|
||||
莫娜: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-9cifXyZ9bT3cS1di-q9.png",
|
||||
达达利亚: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-hu24XyZ9cT3cS1di-q9.png",
|
||||
芭芭拉: "https://img.nga.178.com/attachments/mon_202303/05/i2Qjr7-16o0XtZ7yT3cS1di-q9.png",
|
||||
可莉: "https://img.nga.178.com/attachments/mon_202208/17/i2Q2q-bplpXwZ8zT3cS1di-q9.png",
|
||||
班尼特: "https://img.nga.178.com/attachments/mon_202303/05/i2Qjr7-ggrvXsZ7sT3cS1di-q9.png",
|
||||
重云: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-al2oXxZ9bT3cS1di-q9.png",
|
||||
优菈: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-ec2aXxZ98T3cS1di-q9.png",
|
||||
神里绫华: "https://img.nga.178.com/attachments/mon_202303/27/i2Q8sgk-k1u4XxZ99T3cS1di-q9.png",
|
||||
申鹤: "https://img.nga.178.com/attachments/mon_202303/27/i2Q8sgk-j2z6XtZ81T3cS1di-q9.png",
|
||||
七七: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-gbmkXxZ99T3cS1di-q9.png",
|
||||
罗莎莉亚: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-2tppXyZ9cT3cS1di-q9.png",
|
||||
凯亚: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-cpsdXxZ96T3cS1di-q9.png",
|
||||
甘雨: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-jh27XxZ96T3cS1di-q9.png",
|
||||
迪奥娜: "https://img.nga.178.com/attachments/mon_202303/27/i2Q8sgk-9xe5XtZ80T3cS1di-q9.png",
|
||||
埃洛伊: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-a90bXwZ8yT3cS1di-q9.png",
|
||||
钟离: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-3ifiXwZ8zT3cS1di-q9.png",
|
||||
云堇: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-9yzvXxZ97T3cS1di-q9.png",
|
||||
五郎: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-j6rfXxZ9aT3cS1di-q9.png",
|
||||
诺艾尔: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-9ht1XxZ97T3cS1di-q9.png",
|
||||
凝光: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-3sa1XxZ94T3cS1di-q9.png",
|
||||
岩主: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-kje0XxZ92T3cS1di-q9.png",
|
||||
荒泷一斗: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-73zhXxZ97T3cS1di-q9.png",
|
||||
阿贝多: "https://img.nga.178.com/attachments/mon_202208/19/i2Q2q-cwmhXwZ8wT3cS1di-q9.png",
|
||||
早柚: "https://img.nga.178.com/attachments/mon_202208/21/i2Qjk1-28j7XxZ94T3cS1di-q9.png",
|
||||
魈: "https://img.nga.178.com/attachments/mon_202208/21/i2Qjk1-htbXwZ8yT3cS1di-q9.png",
|
||||
琴: "https://img.nga.178.com/attachments/mon_202208/21/i2Qjk1-kqstXxZ9aT3cS1di-q9.png",
|
||||
鹿野院平藏: "https://img.nga.178.com/attachments/mon_202208/21/i2Qjk1-jx1yXxZ92T3cS1di-q9.png",
|
||||
雷主: "https://img.nga.178.com/attachments/mon_202208/21/i2Qjk1-aqakXxZ93T3cS1di-q9.png",
|
||||
雷泽: "https://img.nga.178.com/attachments/mon_202208/21/i2Qjk1-axdiXxZ97T3cS1di-q9.png",
|
||||
雷电将军: [
|
||||
"https://img.nga.178.com/attachments/mon_202303/05/i2Qjr7-kszoXyZ9eT3cS1di-q9.png",
|
||||
"https://img.nga.178.com/attachments/mon_202303/05/i2Qjr7-ei3cXyZ9fT3cS1di-q9.png"
|
||||
],
|
||||
九条裟罗: "https://img.nga.178.com/attachments/mon_202208/21/i2Qjk1-ep0dXwZ8yT3cS1di-q9.png",
|
||||
提纳里: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-1twzXwZ8uT3cS1di-q9.png",
|
||||
草主: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-620hXuZ8aT3cS1di-q9.png",
|
||||
枫原万叶: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-i5niXvZ8iT3cS1di-q9.png",
|
||||
丽莎: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-ba0sXxZ96T3cS1di-q9.png",
|
||||
刻晴: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-j403XyZ9hT3cS1di-q9.png",
|
||||
久岐忍: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-1zzuXxZ97T3cS1di-q9.png",
|
||||
菲谢尔: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-77grXxZ98T3cS1di-q9.png",
|
||||
北斗: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-5xbkZ2dT3cS1di-q9.png",
|
||||
八重神子: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-ddaeXyZ9kT3cS1di-q9.png",
|
||||
多莉: "https://img.nga.178.com/attachments/mon_202209/09/i2Q181-45azXyZ9bT3cS1di-q9.png",
|
||||
柯莱: "https://img.nga.178.com/attachments/mon_202303/05/i2Qjr7-a7huXsZ7wT3cS1di-q9.png",
|
||||
温迪: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-2s69XwZ8uT3cS1di-q9.png",
|
||||
砂糖: "https://img.nga.178.com/attachments/mon_202303/27/i2Q8sgk-6rx4XtZ81T3cS1di-q9.png",
|
||||
风主: "https://img.nga.178.com/attachments/mon_202208/24/i2Q8oyf-bplhXvZ8lT3cS1di-q9.png",
|
||||
坎蒂丝: "https://img.nga.178.com/attachments/mon_202302/07/i2Q180-jknyXxZ98T3cS1di-q9.png",
|
||||
赛诺: "https://img.nga.178.com/attachments/mon_202302/07/i2Q180-i3a5X10Z9vT3cS1di-q9.png",
|
||||
妮露: "https://img.nga.178.com/attachments/mon_202302/07/i2Q180-7njbXuZ8aT3cS1di-q9.png",
|
||||
纳西妲: "https://img.nga.178.com/attachments/mon_202302/07/i2Q180-klw9Z2pT3cS1di-q9.png",
|
||||
莱依拉: "https://img.nga.178.com/attachments/mon_202302/07/i2Q180-p52XuZ8bT3cS1di-q9.png",
|
||||
珐露珊: "https://img.nga.178.com/attachments/mon_202302/07/i2Q180-cf75XuZ87T3cS1di-q9.png",
|
||||
流浪者: "https://img.nga.178.com/attachments/mon_202302/07/i2Q180-71e3XtZ87T3cS1di-q9.png",
|
||||
艾尔海森: "https://img.nga.178.com/attachments/mon_202302/07/i2Q180-4ntzXuZ8fT3cS1di-q9.png",
|
||||
瑶瑶: "https://img.nga.178.com/attachments/mon_202302/07/i2Q180-a6gvXtZ82T3cS1di-q9.png",
|
||||
迪希雅: "https://img.nga.178.com/attachments/mon_202303/05/i2Qjr7-iq98XtZ85T3cS1di-q9.png",
|
||||
米卡: "https://img.nga.178.com/attachments/mon_202303/27/i2Q8sgk-5qquXtZ7zT3cS1di-q9.png"
|
||||
}
|
||||
@@ -7,7 +7,8 @@
|
||||
"scripts": {
|
||||
"contributors:add": "all-contributors add",
|
||||
"contributors:generate": "all-contributors generate",
|
||||
"lint": "lint-staged --allow-empty"
|
||||
"lint": "lint-staged --allow-empty",
|
||||
"commit": "gitmoji --commit"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user