mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-22 06:58:24 +00:00
调整喵喵角色的msg判定,必须以#开头
调整部分ck判定逻辑
This commit is contained in:
parent
4a4fdd1664
commit
f16f16dc9c
@ -43,7 +43,7 @@ export async function character (e) {
|
||||
|
||||
function checkCharacter (e) {
|
||||
let msg = e.original_msg || e.msg
|
||||
if (!msg) {
|
||||
if (!msg || !/^#/.exec(msg)) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -22,13 +22,11 @@ export default class MysApi {
|
||||
return false
|
||||
}
|
||||
let uid = mys.uid
|
||||
let ckUid = mys.ckInfo?.uid
|
||||
/* 检查user ck */
|
||||
if (auth === 'cookie') {
|
||||
let isCookieUser = await MysInfo.checkUidBing(uid)
|
||||
if (!isCookieUser || uid !== ckUid) {
|
||||
e.reply('尚未绑定Cookie...')
|
||||
return false
|
||||
if (!mys.isSelf) {
|
||||
e.reply('请绑定CK以使用此功能...')
|
||||
return true
|
||||
}
|
||||
}
|
||||
e._mys = new MysApi(e, uid, mys)
|
||||
@ -47,7 +45,7 @@ export default class MysApi {
|
||||
}
|
||||
|
||||
get isSelfCookie () {
|
||||
return this.uid * 1 === this.ckUid * 1
|
||||
return this.uid * 1 === this.ckUid * 1 || this.MysApi.isSelf
|
||||
}
|
||||
|
||||
get ckUid () {
|
||||
|
Loading…
Reference in New Issue
Block a user