This commit is contained in:
batvbs 2023-11-23 13:29:12 +08:00
parent bf9244c328
commit cc3728fe65
2 changed files with 7 additions and 2 deletions

View File

@ -34,7 +34,7 @@ export class user extends plugin {
fnc: 'myCk'
},
{
reg: '^#?删除(ck|cookie)$',
reg: '^#?(原神|星铁)?删除(ck|cookie)$',
fnc: 'delCk'
},
{

View File

@ -150,9 +150,14 @@ export default class User extends base {
/** 删除绑定ck */
async delCk () {
let game = 'gs'
if ( /星铁/.test(this.e.msg) ) {
game = 'sr'
}
//判断是原神还是星铁。e.game总报错暂时只能这么实现大佬轻喷
let user = await this.user()
// 获取当前uid
let uidData = user.getUidData('', this.e)
let uidData = user.getUidData('' , game=game, this.e)
if (!uidData || uidData.type !== 'ck' || !uidData.ltuid) {
return `删除失败当前的UID${uidData?.uid}无CK信息`
}