koishi-plugin-prism-neo 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -8
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -320,14 +320,9 @@ __name(handleRegisterCmd, "handleRegisterCmd");
|
|
|
320
320
|
async function handleLoginCmd(context, user) {
|
|
321
321
|
const { error, userId } = await getTargetUserId(context, user);
|
|
322
322
|
if (error) return error;
|
|
323
|
-
await login(context, userId);
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
return `✅ 已为用户 ${await getUserName(context.session, userId)} 入场,该用户的门锁密码是: ${pwd.password}
|
|
327
|
-
注意! 门锁密码有效期为三分钟`;
|
|
328
|
-
}
|
|
329
|
-
return `✅ 入场成功,你的门锁密码是: ${pwd.password}
|
|
330
|
-
注意! 门锁密码有效期为三分钟`;
|
|
323
|
+
let [_, lockMessage] = await Promise.all([login(context, userId), handleLockCmd(context)]);
|
|
324
|
+
let message = "✅ 入场成功\n\n" + lockMessage;
|
|
325
|
+
return message;
|
|
331
326
|
}
|
|
332
327
|
__name(handleLoginCmd, "handleLoginCmd");
|
|
333
328
|
async function handleLogoutCmd(context, user) {
|
|
@@ -448,6 +443,7 @@ async function handleLockCmd(context) {
|
|
|
448
443
|
return [
|
|
449
444
|
"获取密码成功",
|
|
450
445
|
`你的门锁密码是: ${res.password}`,
|
|
446
|
+
`输入完成后按 # 结束`,
|
|
451
447
|
"注意! 门锁密码有效期为三分钟"
|
|
452
448
|
].join("\n");
|
|
453
449
|
}
|