From 88ba473ba73ed120e73914968534d5cbf8ad0cb3 Mon Sep 17 00:00:00 2001 From: leiyilu <1509167646@qq.com> Date: Thu, 7 Jul 2022 10:52:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=88=B3=E4=B8=80=E6=88=B3?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BD=93=E5=8A=9B=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 5 +++++ apps/Note.js | 3 +++ apps/admin.js | 2 ++ index.js | 3 ++- resources/admin/index.html | 8 +++++++- 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edf2e06..e665057 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +#1.0.8 +* 支持戳一戳返回体力 + * 需要使用喵喵分支Yunzai以支持此能力,如需切换可在Yunzai跟目录输入下方命令后更新重启 + * `git remote set-url origin https://gitee.com/yoimiya-kokomi/Yunzai-Bot` + * 可通过`#图鉴设置` 关闭戳一戳 #1.0.7 *新增`体力推送方法` *可通过修改init.js方法调用实现新版体力推送 diff --git a/apps/Note.js b/apps/Note.js index 7ed090b..6bca05c 100644 --- a/apps/Note.js +++ b/apps/Note.js @@ -352,6 +352,9 @@ export async function DailyNoteTask() { } export async function pokeNote(e){ + if (!Cfg.get("note.poke")) { + return false; + } return await Note(e, getPluginRender("xiaoyao-cvs-plugin")); } diff --git a/apps/admin.js b/apps/admin.js index 3ebf7c9..7c26794 100644 --- a/apps/admin.js +++ b/apps/admin.js @@ -23,6 +23,7 @@ let cfgMap = { "体力": "sys.Note", "帮助": "sys.help", "匹配": "sys.Atlas", + "戳一戳":"note.poke", "模板": "mb.len", "目录":"Atlas.all", }; @@ -88,6 +89,7 @@ export async function sysCfg(e, { Note: getStatus("sys.Note",false), Atlas: getStatus("sys.Atlas",false), len:Cfg.get("mb.len", 0), + poke: getStatus("note.poke"), imgPlus: fs.existsSync(plusPath), bg: await rodom(), //获取底图 Atlasall:getStatus("Atlas.all",false), diff --git a/index.js b/index.js index b343136..28acb59 100644 --- a/index.js +++ b/index.js @@ -11,7 +11,7 @@ import common from "../../lib/common.js"; import { Note,DailyNoteTask, Note_appoint,pokeNote -} from "./apps/Note.js" +} from "./apps/Note.js"; import { rule as adminRule, updateRes, @@ -57,6 +57,7 @@ let rule = { reg: "#poke#", describe: "体力", }, + ...adminRule }; diff --git a/resources/admin/index.html b/resources/admin/index.html index 3a1382a..ef7ff91 100644 --- a/resources/admin/index.html +++ b/resources/admin/index.html @@ -38,7 +38,13 @@