koishi-plugin-ggcevo-game 1.2.69 → 1.2.70

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 +10 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -4184,13 +4184,16 @@ ${validTypes.join("、")}`;
4184
4184
  });
4185
4185
  ctx.command("兑换红晶", "使用金币兑换红晶").action(async ({ session }) => {
4186
4186
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
4187
- if (!profile) return "您暂未绑定句柄。";
4188
- const { regionId, realmId, profileId } = profile;
4189
- const handle = `${regionId}-S2-${realmId}-${profileId}`;
4187
+ if (!profile) return "⚠️ 需要先绑定游戏句柄";
4188
+ const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
4190
4189
  const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
4191
4190
  if (existingEntries.length > 0) {
4192
4191
  return `❌ 拒绝访问,您已被列入黑名单。`;
4193
4192
  }
4193
+ const [careerData] = await ctx.database.get("ggcevo_careers", { handle });
4194
+ if (!careerData || careerData.group !== "辛迪加海盗") {
4195
+ return "🚫 该功能需要【辛迪加海盗】阵营权限";
4196
+ }
4194
4197
  await session.send(`请输入你想要兑换多少红晶?(请在30秒内回复数字,回复“0”为取消兑换)
4195
4198
  注意:每块红晶需要950金币。`);
4196
4199
  const exchangeInput = await session.prompt(3e4);
@@ -4576,6 +4579,10 @@ ${validTypes.join("、")}`;
4576
4579
  const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
4577
4580
  if (!profile) return "您暂未绑定句柄。";
4578
4581
  const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
4582
+ const existingEntries = await ctx.database.get("ggcevo_blacklist", { handle });
4583
+ if (existingEntries.length > 0) {
4584
+ return "❌ 拒绝访问,您已被列入黑名单";
4585
+ }
4579
4586
  try {
4580
4587
  const items = await ctx.database.get("ggcevo_warehouse", { handle });
4581
4588
  const targetItem = items.find((warehouseItem) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ggcevo-game",
3
3
  "description": "《星际争霸2》咕咕虫-evolved地图的专属游戏助手插件,集成天梯排行、抽奖系统、签到福利、兑换商城等丰富功能。",
4
- "version": "1.2.69",
4
+ "version": "1.2.70",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [