From 94c84da957c22861c5a85c3e867016fd664c8358 Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Tue, 18 Oct 2022 07:12:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=9D=83=E9=99=90=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sign.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/sign.js b/apps/sign.js index 8f9ecee..05576c2 100644 --- a/apps/sign.js +++ b/apps/sign.js @@ -43,7 +43,19 @@ export async function cloudSign(e){ await replyMsg(e, res.message); return true; } +const checkAuth = async function (e) { + if (!e.isMaster) { + e.reply(`只有主人才能命令我哦~ + (*/ω\*)`) + return false + } + return true; +} + export async function signTask(e){ + if (!await checkAuth(e)) { + return true; + } let user = new User(e); let task=e?.msg?.includes("米游币")?'bbs':e?.msg?.includes("云原神")?'cloud':e?.msg?.includes("米社")?'mys':'' if(!task){