From cc3728fe659f26aa8a6b4e235e4dbbbafcf5f720 Mon Sep 17 00:00:00 2001 From: batvbs Date: Thu, 23 Nov 2023 13:29:12 +0800 Subject: [PATCH] update --- plugins/genshin/apps/user.js | 2 +- plugins/genshin/model/user.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/genshin/apps/user.js b/plugins/genshin/apps/user.js index 0a25d86..62ca165 100644 --- a/plugins/genshin/apps/user.js +++ b/plugins/genshin/apps/user.js @@ -34,7 +34,7 @@ export class user extends plugin { fnc: 'myCk' }, { - reg: '^#?删除(ck|cookie)$', + reg: '^#?(原神|星铁)?删除(ck|cookie)$', fnc: 'delCk' }, { diff --git a/plugins/genshin/model/user.js b/plugins/genshin/model/user.js index 106104a..369822d 100644 --- a/plugins/genshin/model/user.js +++ b/plugins/genshin/model/user.js @@ -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信息` }