koishi-plugin-ggcevo-game 2.0.1 → 2.0.3

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 forgetmelody
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 forgetmelody
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/lib/database.d.ts CHANGED
@@ -72,13 +72,13 @@ export interface RankRecord {
72
72
  }
73
73
  export interface PunishmentRecord {
74
74
  id: number;
75
- name: string;
76
75
  handle: string;
76
+ qq: string;
77
77
  level: string;
78
78
  reason: string;
79
- count: string;
79
+ count: number;
80
80
  reviewer: string;
81
- date: string;
81
+ date: Date;
82
82
  comment?: string;
83
83
  }
84
84
  export interface ExchangeLog {
package/lib/index.js CHANGED
@@ -7564,19 +7564,19 @@ function apply(ctx, config) {
7564
7564
  ctx.model.extend("ggcevo_punishment", {
7565
7565
  id: "unsigned",
7566
7566
  // 自增序号
7567
- name: "string",
7568
- // 使用字符串存储名字
7569
7567
  handle: "string",
7570
7568
  // 平台用户句柄/ID
7569
+ qq: "string",
7570
+ // 关联QQ号
7571
7571
  level: "string",
7572
7572
  // 处罚等级
7573
7573
  reason: "text",
7574
7574
  // 长文本存储处罚原因
7575
- count: "string",
7575
+ count: "unsigned",
7576
7576
  // 处罚次数
7577
7577
  reviewer: "string",
7578
7578
  // 审核人名称
7579
- date: "string",
7579
+ date: "timestamp",
7580
7580
  // 处罚时间
7581
7581
  comment: "text"
7582
7582
  // 备注信息(可选)
@@ -8082,7 +8082,7 @@ function apply(ctx, config) {
8082
8082
  });
8083
8083
  ctx.command("ggcevo/单抽").action(async (argv) => {
8084
8084
  const session = argv.session;
8085
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
8085
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
8086
8086
  if (!profile) {
8087
8087
  return "🔒 需要先绑定游戏句柄。";
8088
8088
  }
@@ -8109,7 +8109,7 @@ function apply(ctx, config) {
8109
8109
  });
8110
8110
  ctx.command("ggcevo/十连抽").action(async (argv) => {
8111
8111
  const session = argv.session;
8112
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
8112
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
8113
8113
  if (!profile) {
8114
8114
  return "🔒 需要先绑定游戏句柄。";
8115
8115
  }
@@ -8141,7 +8141,7 @@ function apply(ctx, config) {
8141
8141
  });
8142
8142
  ctx.command("ggcevo/背包").action(async (argv) => {
8143
8143
  const session = argv.session;
8144
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
8144
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
8145
8145
  if (!profile) return "🔒 需要先绑定游戏句柄。";
8146
8146
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
8147
8147
  const items = await ctx.database.get("ggcevo_backpack", { handle });
@@ -8161,7 +8161,7 @@ ${itemDetails.join("\n")}`;
8161
8161
  ctx.command("ggcevo/签到").action(async (argv) => {
8162
8162
  try {
8163
8163
  const session = argv.session;
8164
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
8164
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
8165
8165
  if (!profile) return "🔒 需要先绑定游戏句柄。";
8166
8166
  const { regionId, realmId, profileId } = profile;
8167
8167
  const handle = `${regionId}-S2-${realmId}-${profileId}`;
@@ -8319,7 +8319,7 @@ ${ticketMessage}${effectMessage}`;
8319
8319
  ctx.command("ggcevo/补签").action(async (argv) => {
8320
8320
  try {
8321
8321
  const session = argv.session;
8322
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
8322
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
8323
8323
  if (!profile) return "🔒 需要先绑定游戏句柄。";
8324
8324
  const { regionId, realmId, profileId } = profile;
8325
8325
  const handle = `${regionId}-S2-${realmId}-${profileId}`;
@@ -8374,7 +8374,7 @@ ${ticketMessage}${effectMessage}`;
8374
8374
  });
8375
8375
  ctx.guild().command("ggcevo/每月津贴").action(async (argv) => {
8376
8376
  const session = argv.session;
8377
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
8377
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
8378
8378
  if (!profile) return "🔒 需要先绑定游戏句柄。";
8379
8379
  const { regionId, realmId, profileId } = profile;
8380
8380
  const handle = `${regionId}-S2-${realmId}-${profileId}`;
@@ -8728,7 +8728,7 @@ ${ticketMessage}${effectMessage}`;
8728
8728
  const ctx2 = session.bot.ctx;
8729
8729
  let handle;
8730
8730
  if (!player) {
8731
- const [profile] = await ctx2.database.get("sc2arcade_player", { userId: session.userId });
8731
+ const [profile] = await ctx2.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
8732
8732
  if (!profile) return "🔒 需要先绑定游戏句柄。";
8733
8733
  handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
8734
8734
  } else {
@@ -8823,12 +8823,13 @@ ${ticketMessage}${effectMessage}`;
8823
8823
  const recordText = records.map((item) => {
8824
8824
  const baseInfo = [
8825
8825
  `ID: ${item.id}`,
8826
- `名字: ${item.name}`,
8827
8826
  `句柄: ${item.handle}`,
8827
+ `QQ: ${item.qq}`,
8828
8828
  `处罚等级: ${item.level}`,
8829
8829
  `处罚原因: ${item.reason}`,
8830
8830
  `处罚次数: ${item.count}`,
8831
- `审核人: ${item.reviewer}`
8831
+ `审核人: ${item.reviewer}`,
8832
+ `处罚时间: ${item.date.toLocaleString("zh-CN", { timeZone: "Asia/Shanghai" })}`
8832
8833
  ];
8833
8834
  let finalText = baseInfo.join("\n");
8834
8835
  return finalText;
@@ -8844,7 +8845,7 @@ ${ticketMessage}${effectMessage}`;
8844
8845
  });
8845
8846
  ctx.command("ggcevo/兑换赞助物品", "兑换赞助物品").action(async ({ session }) => {
8846
8847
  try {
8847
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
8848
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
8848
8849
  if (!profile) return "🔒 需要先绑定游戏句柄。";
8849
8850
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
8850
8851
  const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
@@ -9037,7 +9038,7 @@ ${items.join("、")}
9037
9038
  });
9038
9039
  ctx.command("ggcevo/扭蛋").action(async (argv) => {
9039
9040
  const session = argv.session;
9040
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9041
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
9041
9042
  if (!profile) {
9042
9043
  return "🔒 需要先绑定游戏句柄。";
9043
9044
  }
@@ -9153,7 +9154,7 @@ ${items.join("、")}
9153
9154
  ctx.command("ggcevo/个人信息").action(async (argv) => {
9154
9155
  const session = argv.session;
9155
9156
  const output = [];
9156
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9157
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
9157
9158
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9158
9159
  const { regionId, realmId, profileId } = profile;
9159
9160
  const handle = `${regionId}-S2-${realmId}-${profileId}`;
@@ -9231,7 +9232,7 @@ ${items.join("、")}
9231
9232
  const session = argv.session;
9232
9233
  const Curfew = fixedCurfewCheck(session, config);
9233
9234
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
9234
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9235
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
9235
9236
  if (!profile) return "🔒 需要先绑定游戏句柄。";
9236
9237
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
9237
9238
  const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
@@ -9614,7 +9615,7 @@ ${protectionList}
9614
9615
  ctx.command("ggcevo/武器库 [category]").usage('输入"武器库"查看类型,或"武器库 类型"查看详细武器信息').action(async ({ session }, category) => {
9615
9616
  const Curfew = fixedCurfewCheck(session, config);
9616
9617
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
9617
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
9618
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
9618
9619
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
9619
9620
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
9620
9621
  const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
@@ -10070,7 +10071,7 @@ ${discountDetails.join("\n")}`;
10070
10071
  ctx.command("ggcevo/升级科技 <target>", "升级空间站科技").action(async ({ session }, target) => {
10071
10072
  const Curfew = fixedCurfewCheck(session, config);
10072
10073
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
10073
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10074
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
10074
10075
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10075
10076
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
10076
10077
  if ((await ctx.database.get("ggcevo_blacklist", { handle })).length) {
@@ -10089,7 +10090,7 @@ ${discountDetails.join("\n")}`;
10089
10090
  ctx.command("ggcevo/升级武器 <target>", "升级武器").alias("升级").action(async ({ session }, target) => {
10090
10091
  const Curfew = fixedCurfewCheck(session, config);
10091
10092
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
10092
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10093
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
10093
10094
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10094
10095
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
10095
10096
  if ((await ctx.database.get("ggcevo_blacklist", { handle })).length) {
@@ -10265,7 +10266,7 @@ ${discountDetails.join("\n")}`;
10265
10266
  ctx.command("ggcevo/拆卸 <weapon> <mod>", "卸载武器模块,专属模块返还50%金币,通用模块返还80%金币").action(async ({ session }, weapon, mod) => {
10266
10267
  const Curfew = fixedCurfewCheck(session, config);
10267
10268
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
10268
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10269
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
10269
10270
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10270
10271
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
10271
10272
  const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
@@ -10329,7 +10330,7 @@ ${discountDetails.join("\n")}`;
10329
10330
  const Curfew = privateChatCurfewCheck(session, config);
10330
10331
  if (!Curfew) return "⛔ 非宵禁时段 (0:00-18:00) 禁止在私聊中使用攻击指令。";
10331
10332
  }
10332
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10333
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
10333
10334
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10334
10335
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
10335
10336
  const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
@@ -10564,7 +10565,7 @@ ${discountDetails.join("\n")}`;
10564
10565
  const parseList = /* @__PURE__ */ __name((str) => str ? str.split(",").map((s) => s.trim()).filter(Boolean) : [], "parseList");
10565
10566
  const tags = parseList(options.tags);
10566
10567
  const passives = parseList(options.passives);
10567
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10568
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
10568
10569
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10569
10570
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
10570
10571
  const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
@@ -10870,7 +10871,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10870
10871
  const session = argv.session;
10871
10872
  const Curfew = fixedCurfewCheck(session, config);
10872
10873
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
10873
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10874
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
10874
10875
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10875
10876
  const { regionId, realmId, profileId } = profile;
10876
10877
  const handle = `${regionId}-S2-${realmId}-${profileId}`;
@@ -10954,7 +10955,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
10954
10955
  ctx.command("ggcevo/加入 <faction>", "加入阵营").alias("加入阵营").action(async ({ session }, faction) => {
10955
10956
  const Curfew = fixedCurfewCheck(session, config);
10956
10957
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
10957
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
10958
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
10958
10959
  if (!profile) return "🔒 需要先绑定游戏句柄。";
10959
10960
  const { regionId, realmId, profileId } = profile;
10960
10961
  const handle = `${regionId}-S2-${realmId}-${profileId}`;
@@ -11020,7 +11021,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
11020
11021
  ctx.command("ggcevo/退出", "退出当前阵营").alias("退出阵营").action(async ({ session }) => {
11021
11022
  const Curfew = fixedCurfewCheck(session, config);
11022
11023
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
11023
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11024
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
11024
11025
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11025
11026
  const { regionId, realmId, profileId } = profile;
11026
11027
  const handle = `${regionId}-S2-${realmId}-${profileId}`;
@@ -11072,7 +11073,7 @@ ${testResult.passiveMessages.map((m) => `▸ ${m}`).join("\n")}`
11072
11073
  ctx.command("ggcevo/转职 [profession]", "转职系统").action(async ({ session }, profession) => {
11073
11074
  const Curfew = fixedCurfewCheck(session, config);
11074
11075
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
11075
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11076
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
11076
11077
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11077
11078
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
11078
11079
  const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
@@ -11484,7 +11485,7 @@ ${discountReason}` : "",
11484
11485
  const session = argv.session;
11485
11486
  const Curfew = fixedCurfewCheck(session, config);
11486
11487
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
11487
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11488
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
11488
11489
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11489
11490
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
11490
11491
  const [items, signData, careerData] = await Promise.all([
@@ -11644,7 +11645,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11644
11645
  ctx.command("ggcevo/挖矿").action(async ({ session }) => {
11645
11646
  const Curfew = fixedCurfewCheck(session, config);
11646
11647
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
11647
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11648
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
11648
11649
  if (!profile) return "🔒 需要先绑定游戏句柄。";
11649
11650
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
11650
11651
  if (await ctx.database.get("ggcevo_blacklist", { handle }).then((r) => r.length)) {
@@ -11845,7 +11846,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11845
11846
  try {
11846
11847
  const Curfew = fixedCurfewCheck(session, config);
11847
11848
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
11848
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11849
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
11849
11850
  if (!profile) return "⚠️ 需要先绑定游戏句柄";
11850
11851
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
11851
11852
  if (await ctx.database.get("ggcevo_blacklist", { handle }).then((r) => r.length)) {
@@ -11985,7 +11986,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
11985
11986
  const session = argv.session;
11986
11987
  const Curfew = fixedCurfewCheck(session, config);
11987
11988
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
11988
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
11989
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
11989
11990
  if (!profile) return "🔒 请先绑定游戏句柄。";
11990
11991
  const { regionId, realmId, profileId } = profile;
11991
11992
  const handle = `${regionId}-S2-${realmId}-${profileId}`;
@@ -12161,7 +12162,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12161
12162
  { id: 9, name: "莫洛托夫燃烧弹", type: "手榴弹", chance: 0.05 },
12162
12163
  { id: 10, name: "铝热炸弹", type: "爆破物", chance: 0.05 }
12163
12164
  ];
12164
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12165
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
12165
12166
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12166
12167
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
12167
12168
  const name2 = session.username;
@@ -12530,7 +12531,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12530
12531
  ctx.command("ggcevo/飞船信息").action(async ({ session }) => {
12531
12532
  const Curfew = fixedCurfewCheck(session, config);
12532
12533
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
12533
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12534
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
12534
12535
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12535
12536
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
12536
12537
  const [shipRecord] = await ctx.database.get("ggcevo_spaceship", { handle });
@@ -12558,7 +12559,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12558
12559
  ctx.command("ggcevo/购买飞船 [shipName]").alias("飞船").action(async ({ session }, shipName) => {
12559
12560
  const Curfew = fixedCurfewCheck(session, config);
12560
12561
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
12561
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12562
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
12562
12563
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12563
12564
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
12564
12565
  if ((await ctx.database.get("ggcevo_blacklist", { handle })).length) {
@@ -12631,7 +12632,7 @@ ${Spacestationtechnology.map((t) => t.techname).join("、")}`;
12631
12632
  ctx.command("ggcevo/升级物品 [itemName]", "升级辛迪加海盗物品").usage('输入"升级物品"查看可升级列表,或"升级物品 物品名称"进行升级').action(async ({ session }, itemName) => {
12632
12633
  const Curfew = fixedCurfewCheck(session, config);
12633
12634
  if (!Curfew) return "⛔ 宵禁时段 (18:00-24:00) 禁止在群聊中使用咕咕之战指令。\n请添加C.O.R.E为好友使用私聊指令,好友验证信息为【咕咕之战】。";
12634
- const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
12635
+ const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId, isActive: true });
12635
12636
  if (!profile) return "🔒 需要先绑定游戏句柄。";
12636
12637
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
12637
12638
  if ((await ctx.database.get("ggcevo_blacklist", { handle })).length) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ggcevo-game",
3
3
  "description": "星际争霸2咕咕虫-evolved地图的专属游戏助手插件,集成天梯排行、抽奖系统、签到福利、兑换商城等丰富功能。",
4
- "version": "2.0.1",
4
+ "version": "2.0.3",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -19,7 +19,7 @@
19
19
  "peerDependencies": {
20
20
  "@koishijs/plugin-proxy-agent": "^0.3.3",
21
21
  "koishi": "^4.18.7",
22
- "koishi-plugin-sc2arcade-search": "^1.2.2"
22
+ "koishi-plugin-sc2arcade-search": "^1.2.3"
23
23
  },
24
24
  "koishi": {
25
25
  "service": {
package/readme.md CHANGED
@@ -1,5 +1,5 @@
1
- # koishi-plugin-ggcevo-game
2
-
3
- [![npm](https://img.shields.io/npm/v/koishi-plugin-ggcevo-game?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-ggcevo-game)
4
-
5
-
1
+ # koishi-plugin-ggcevo-game
2
+
3
+ [![npm](https://img.shields.io/npm/v/koishi-plugin-ggcevo-game?style=flat-square)](https://www.npmjs.com/package/koishi-plugin-ggcevo-game)
4
+
5
+