From 3b7520f2ead9441b7f66931515140286f8a9cfb9 Mon Sep 17 00:00:00 2001 From: yeyang <746659424@qq.com> Date: Thu, 13 Jun 2024 17:54:02 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=A4=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/prepare-commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index 3124203..a6573a5 100644 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -6,5 +6,5 @@ echo " 遵循 Gitmoji" echo " https://gitmoji.dev/" echo -e "\e[1;36m----------------------------------------------\e[0m" -exec < /dev/tty +# exec < /dev/tty pnpm gitmoji --hook $1 $2 From 86282dd195908aa2e43770ac1ba13f4987cb4543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AD=89=E9=A3=8E=E6=9D=A5?= <3139373986@qq.com> Date: Thu, 13 Jun 2024 18:18:16 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A4=A1=20=E7=BB=86=E8=8A=82=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/prepare-commit-msg | 10 ---------- CONTRIBUTING.md | 4 ++-- package.json | 3 ++- 3 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 .husky/prepare-commit-msg diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg deleted file mode 100644 index a6573a5..0000000 --- a/.husky/prepare-commit-msg +++ /dev/null @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9165f5e..fa0daee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. 如果提交的代码不符合项目的规范要求,您将会收到相应的错误提示。请根据提示信息进行修改和调整,直到提交的代码符合要求。 diff --git a/package.json b/package.json index a426269..ca28c25 100644 --- a/package.json +++ b/package.json @@ -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", From 63ad05b1fac55c7c67aa5c16640275b029bf210b Mon Sep 17 00:00:00 2001 From: yeyang <746659424@qq.com> Date: Thu, 13 Jun 2024 23:27:51 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=94=A5=20=E7=A7=BB=E9=99=A4`#?= =?UTF-8?q?=E5=8F=82=E8=80=83=E9=9D=A2=E6=9D=BF`=20`#=E6=94=B6=E7=9B=8A?= =?UTF-8?q?=E6=9B=B2=E7=BA=BF`=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + apps/nga.js | 112 ----------------------------------- config/system/help_system.js | 14 ----- constants/nga.js | 74 ----------------------- 4 files changed, 1 insertion(+), 200 deletions(-) delete mode 100644 apps/nga.js delete mode 100644 constants/nga.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f2879..139d1dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * 优化发好友、发群聊 * 消息为空后可单独发送,以支持更多消息类型 * 新增`#ocr`命令ⁿᵉʷ +* 移除`#参考面板` `#收益曲线`功能 * 修复同意回复 # 1.4.6 diff --git a/apps/nga.js b/apps/nga.js deleted file mode 100644 index 5a14917..0000000 --- a/apps/nga.js +++ /dev/null @@ -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 - } -} diff --git a/config/system/help_system.js b/config/system/help_system.js index 220f612..1791865 100644 --- a/config/system/help_system.js +++ b/config/system/help_system.js @@ -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: "随机唱鸭" diff --git a/constants/nga.js b/constants/nga.js deleted file mode 100644 index 1c7bb6f..0000000 --- a/constants/nga.js +++ /dev/null @@ -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" -} From af15d4b9b400f3986233b4e545451360e71182b0 Mon Sep 17 00:00:00 2001 From: yeyang <746659424@qq.com> Date: Thu, 13 Jun 2024 23:32:28 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=92=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ac91e3a..7951afa 100644 --- a/README.md +++ b/README.md @@ -128,20 +128,12 @@ Tip:具体可使用 **#椰奶设置** 查看 - [x] 随机唱鸭 -- [x] 角色收益曲线 - - [x] 赞我(支持陌生人点赞) - [x] coser -- [x] 铃声搜索 - - [x] 支付宝到账语音 -- [x] 半次元话题 - -- [x] 哪个叼毛是龙王 -
Pixiv功能 @@ -199,6 +191,8 @@ Tip:详情请参考[此教程](https://docs.qq.com/doc/p/108e5d788607d988ac62e - [ ] 黑名单 +- [x] 哪个叼毛是龙王 + Tip:具体可使用 **#椰奶群管帮助** 查看