2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-22 19:10:53 +08:00

fix:权限修正

This commit is contained in:
Ctrlcvs 2022-10-18 07:12:47 +08:00
parent 9afdd7858c
commit 94c84da957

View File

@ -43,7 +43,19 @@ export async function cloudSign(e){
await replyMsg(e, res.message); await replyMsg(e, res.message);
return true; return true;
} }
const checkAuth = async function (e) {
if (!e.isMaster) {
e.reply(`只有主人才能命令我哦~
(*/ω*)`)
return false
}
return true;
}
export async function signTask(e){ export async function signTask(e){
if (!await checkAuth(e)) {
return true;
}
let user = new User(e); let user = new User(e);
let task=e?.msg?.includes("米游币")?'bbs':e?.msg?.includes("云原神")?'cloud':e?.msg?.includes("米社")?'mys':'' let task=e?.msg?.includes("米游币")?'bbs':e?.msg?.includes("云原神")?'cloud':e?.msg?.includes("米社")?'mys':''
if(!task){ if(!task){