koishi-plugin-iirose-cut 0.0.4 → 0.0.6

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 +8 -8
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -8,26 +8,26 @@ function apply(ctx) {
8
8
  const nowUserList = [];
9
9
  const whiteList = [];
10
10
  let status = false;
11
- ctx.on('iirose/newMusic', (session, data) => {
11
+ ctx.on('iirose/newMusic', (session) => {
12
12
  if (!status) {
13
13
  return;
14
14
  }
15
- const index = nowUserList.indexOf(data.owner);
16
- const index2 = whiteList.indexOf(data.owner);
15
+ const index = nowUserList.indexOf(session.data.owner);
16
+ const index2 = whiteList.indexOf(session.data.owner);
17
17
  if (index > -1 || index2 > -1) {
18
18
  return;
19
19
  }
20
20
  ctx.emit('iirose/cut-one', {});
21
21
  });
22
- ctx.on('iirose/joinRoom', (session, data) => {
23
- const index = nowUserList.indexOf(data.username);
22
+ ctx.on('iirose/joinRoom', (session) => {
23
+ const index = nowUserList.indexOf(session.data.username);
24
24
  if (index > -1) {
25
25
  return;
26
26
  }
27
- nowUserList.push(data.username);
27
+ nowUserList.push(session.data.username);
28
28
  });
29
- ctx.on('iirose/leaveRoom', (session, data) => {
30
- const index = nowUserList.indexOf(data.username);
29
+ ctx.on('iirose/leaveRoom', (session) => {
30
+ const index = nowUserList.indexOf(session.data.username);
31
31
  if (index < 0) {
32
32
  return;
33
33
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-iirose-cut",
3
3
  "description": "适用于的[IIROSE蔷薇花园](https://iirose.com/)自动切除退出房间的人所点的歌曲",
4
- "version": "0.0.4",
4
+ "version": "0.0.6",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -16,8 +16,8 @@
16
16
  "plugin"
17
17
  ],
18
18
  "peerDependencies": {
19
- "koishi": "4.14.1",
20
- "koishi-plugin-adapter-iirose": "^0.2.11"
19
+ "koishi": "^4.14.1",
20
+ "koishi-plugin-adapter-iirose": "~0.2.36"
21
21
  },
22
22
  "homepage": "https://forum.bstluo.top/"
23
23
  }