From eaaf28223cba486f5fbd26e25677e24dcc752ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=83=E5=A5=88=E5=8D=83=E7=A5=81?= <2632139786@qq.com> Date: Sat, 9 Mar 2024 12:17:17 +0000 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4uid=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 千奈千祁 <2632139786@qq.com> --- plugins/genshin/apps/user.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/genshin/apps/user.js b/plugins/genshin/apps/user.js index 8a67d14..415dd4f 100644 --- a/plugins/genshin/apps/user.js +++ b/plugins/genshin/apps/user.js @@ -38,7 +38,7 @@ export class user extends plugin { fnc: 'delCk' }, { - reg: '^#?(原神|星铁)?(删除|解绑)(uid|UID)\\s*[0-9]{1,2}$', + reg: '^#?(原神|星铁)?(删除|解绑)(uid|UID)\\s*([0-9]{1,2})?$', fnc: 'delUid' }, { @@ -177,6 +177,10 @@ export class user extends plugin { async delUid() { let index = this.e.msg.match(/[0-9]{1,2}$/g) + if(!index) { + this.e.reply(`删除uid请带上序号\n例如:#删除uid1\n发送【#uid】可查看绑定的uid以及对应的序号`) + return true; + } let uidIdx = index && index[0] let game = this.e if (uidIdx) {