mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
修正V3云崽下的master判定
This commit is contained in:
parent
15dd51ca54
commit
9964b5df1f
@ -110,5 +110,21 @@ export async function getMysApi (e, cfg) {
|
||||
}
|
||||
|
||||
export async function checkAuth (e, cfg) {
|
||||
return new User({ id: e.user_id })
|
||||
let { auth = 'all' } = cfg
|
||||
let uid = await MysInfo.getUid(e)
|
||||
if (!uid) return false
|
||||
|
||||
if (auth === 'master' && !e.isMaster) {
|
||||
return false
|
||||
}
|
||||
|
||||
/* 检查user ck */
|
||||
let isCookieUser = await MysInfo.checkUidBing(uid)
|
||||
if (auth === 'cookie' && !isCookieUser) {
|
||||
e.reply('尚未绑定Cookie...')
|
||||
return false
|
||||
}
|
||||
|
||||
e.selfUser = new User({ id: e.user_id, uid })
|
||||
return e.selfUser
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
import { Common, Cfg } from '../components/index.js'
|
||||
import { renderAvatar } from './character/avatar-card.js'
|
||||
import { getTargetUid, getProfile, profileHelp, getProfileAll } from './character/profile-common.js'
|
||||
|
||||
import { profileArtis } from './character/profile-artis.js'
|
||||
import { renderProfile } from './character/profile-detail.js'
|
||||
|
||||
import { Character } from '../components/models.js'
|
||||
import { isV3 } from '../components/Changelog.js'
|
||||
|
||||
export { enemyLv, getOriginalPicture } from './character/utils.js'
|
||||
|
||||
@ -23,7 +22,7 @@ export { wife, pokeWife, wifeReg } from './character/avatar-wife.js'
|
||||
|
||||
// 查看当前角色
|
||||
export async function character (e, { render }) {
|
||||
let msg = e.raw_message || e.msg
|
||||
let msg = isV3 ? e.raw_message : e.msg
|
||||
if (!msg) {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user