koishi-plugin-18xx 0.0.3 → 0.0.4

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 +9 -9
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -99,7 +99,7 @@ function command(ctx, config) {
99
99
  if (!found) return "";
100
100
  }
101
101
  }, "checkSessionMiddleware");
102
- ctx.command("18xx.bind <id>", "绑定 18xx.games 账号").usage("id 是个人资料页地址栏 profile 后面的数字").before(checkSessionMiddleware).action(async ({ session }, id) => {
102
+ ctx.command("18xx.bind <id>", "绑定账号").usage("id 是个人资料页地址栏 profile 后面的数字").before(checkSessionMiddleware).action(async ({ session }, id) => {
103
103
  if (Number(id)) {
104
104
  const result = await ctx.database.upsert(name, [
105
105
  {
@@ -119,28 +119,28 @@ function command(ctx, config) {
119
119
  return "绑定失败";
120
120
  }
121
121
  });
122
- ctx.command("18xx.unbind <id>", "取消绑定 18xx.games 账号").usage("id 是个人资料页地址栏 profile 后面的数字").action(async ({ session }, id) => {
122
+ ctx.command("18xx.unbind <id>", "取消绑定账号").usage("id 是个人资料页地址栏 profile 后面的数字").action(async ({ session }, id) => {
123
123
  const result = await ctx.database.remove(name, { id: Number(id), userId: session.userId });
124
124
  if (!result.matched) {
125
- return "你还没有绑定 18xx.games 账号";
125
+ return "你还没有绑定账号";
126
126
  }
127
127
  if (result.removed) {
128
128
  return `${id} 解绑成功`;
129
129
  }
130
130
  return "解绑失败";
131
131
  });
132
- ctx.command("18xx.list", "列出已绑定的 18xx.games 账号").alias("18xx.ls").action(async ({ session }) => {
132
+ ctx.command("18xx.list", "列出已绑定的账号").alias("18xx.ls").action(async ({ session }) => {
133
133
  const profiles = await ctx.database.get(name, { userId: session.userId });
134
134
  if (!profiles.length) {
135
- return "你还没有绑定 18xx.games 账号";
135
+ return "你还没有绑定账号";
136
136
  }
137
137
  return `当前已绑定${profiles.length}个账号:
138
138
  ${profiles.map((p) => `${p.id}`).join("\n")}`;
139
139
  });
140
- ctx.command("18xx.on", "开启 18xx.games 通知").usage("需要先绑定 18xx.games 账号,并在个人资料页 webhook_user_id 中填入你的 id").action(async ({ session }) => {
140
+ ctx.command("18xx.on", "开启通知").usage("需要先绑定账号,并在个人资料页 webhook_user_id 中填入你的 id").action(async ({ session }) => {
141
141
  const profiles = await ctx.database.get(name, { userId: session.userId });
142
142
  if (!profiles.length) {
143
- return "你还没有绑定 18xx.games 账号";
143
+ return "你还没有绑定账号";
144
144
  }
145
145
  const result = await ctx.database.upsert(
146
146
  name,
@@ -151,10 +151,10 @@ ${profiles.map((p) => `${p.id}`).join("\n")}`;
151
151
  }
152
152
  return "通知已开启";
153
153
  });
154
- ctx.command("18xx.off", "关闭 18xx.games 通知").action(async ({ session }) => {
154
+ ctx.command("18xx.off", "关闭通知").action(async ({ session }) => {
155
155
  const profiles = await ctx.database.get(name, { userId: session.userId });
156
156
  if (!profiles.length) {
157
- return "你还没有绑定 18xx.games 账号";
157
+ return "你还没有绑定账号";
158
158
  }
159
159
  const result = await ctx.database.upsert(
160
160
  name,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-18xx",
3
3
  "description": "18xxGames 机器人",
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "keywords": [
21
21
  "koishi",
22
- "18xxgames",
22
+ "18xx.games",
23
23
  "webhook"
24
24
  ],
25
25
  "devDependencies": {
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@koishijs/plugin-server": "^3.2.7",
31
- "@satorijs/element": "^3.1.8",
31
+ "@satorijs/element": "*",
32
32
  "koishi": "^4.18.7"
33
33
  },
34
34
  "koishi": {