koishi-plugin-prism-neo 0.0.14 → 0.0.15

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.
Files changed (2) hide show
  1. package/lib/index.js +4 -7
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -321,13 +321,9 @@ async function handleLoginCmd(context, user) {
321
321
  const { error, userId } = await getTargetUserId(context, user);
322
322
  if (error) return error;
323
323
  await login(context, userId);
324
- const pwd = await getLock(context, userId);
325
- if (user) {
326
- return `✅ 已为用户 ${await getUserName(context.session, userId)} 入场,该用户的门锁密码是: ${pwd.password}
327
- 注意! 门锁密码有效期为三分钟`;
328
- }
329
- return `✅ 入场成功,你的门锁密码是: ${pwd.password}
330
- 注意! 门锁密码有效期为三分钟`;
324
+ let [_, lockMessage] = await Promise.all([login(context, userId), handleLockCmd(context)]);
325
+ let message = "✅ 入场成功\n\n" + lockMessage;
326
+ return message;
331
327
  }
332
328
  __name(handleLoginCmd, "handleLoginCmd");
333
329
  async function handleLogoutCmd(context, user) {
@@ -448,6 +444,7 @@ async function handleLockCmd(context) {
448
444
  return [
449
445
  "获取密码成功",
450
446
  `你的门锁密码是: ${res.password}`,
447
+ `输入完成后按 # 结束`,
451
448
  "注意! 门锁密码有效期为三分钟"
452
449
  ].join("\n");
453
450
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-prism-neo",
3
3
  "description": "prism koishi前端",
4
- "version": "0.0.14",
4
+ "version": "0.0.15",
5
5
  "main": "lib/index.js",
6
6
  "files": [
7
7
  "lib",