koishi-plugin-ggcevo-game 1.2.34 → 1.2.36
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/lib/index.js +12 -9
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1094,7 +1094,7 @@ ${itemDetails.join("\n")}`;
|
|
|
1094
1094
|
`您的句柄:${handle}`,
|
|
1095
1095
|
`📅 最后签到时间:${chinaTime}`,
|
|
1096
1096
|
`🔥 累计签到:${record.monthlyDays}天`,
|
|
1097
|
-
`💰
|
|
1097
|
+
`💰 拥有金币:${record.totalRewards}枚金币`
|
|
1098
1098
|
].join("\n");
|
|
1099
1099
|
});
|
|
1100
1100
|
ctx.guild().command("ggcevo/每月津贴").action(async (argv) => {
|
|
@@ -1560,7 +1560,8 @@ ${itemDetails.join("\n")}`;
|
|
|
1560
1560
|
const { regionId, realmId, profileId } = profile;
|
|
1561
1561
|
const handle = `${regionId}-S2-${realmId}-${profileId}`;
|
|
1562
1562
|
const [user] = await ctx.database.get("ggcevo_rank", {
|
|
1563
|
-
handle
|
|
1563
|
+
handle,
|
|
1564
|
+
rankseason: config.rankseason
|
|
1564
1565
|
});
|
|
1565
1566
|
if (!user) return "暂未找到您的排名信息。";
|
|
1566
1567
|
if (user.Blacklist) return "❌ 您已经被禁止参加本赛季胜点榜。";
|
|
@@ -1593,7 +1594,8 @@ ${itemDetails.join("\n")}`;
|
|
|
1593
1594
|
const { regionId, realmId, profileId } = profile;
|
|
1594
1595
|
const handle = `${regionId}-S2-${realmId}-${profileId}`;
|
|
1595
1596
|
const [user] = await ctx.database.get("ggcevo_rank", {
|
|
1596
|
-
handle
|
|
1597
|
+
handle,
|
|
1598
|
+
rankseason: config.rankseason
|
|
1597
1599
|
});
|
|
1598
1600
|
if (!user) return "暂未找到对方的排名信息。";
|
|
1599
1601
|
if (user.Blacklist) return "❌ 对方已经被禁止参加本赛季胜点榜。";
|
|
@@ -1936,13 +1938,14 @@ ${output}`;
|
|
|
1936
1938
|
if (!handleRegex.test(handle)) {
|
|
1937
1939
|
return "句柄格式错误,请重新输入。";
|
|
1938
1940
|
}
|
|
1939
|
-
const existingEntries = await ctx.database.get("ggcevo_rank", { handle, Blacklist: true });
|
|
1941
|
+
const existingEntries = await ctx.database.get("ggcevo_rank", { handle, Blacklist: true, rankseason: config.rankseason });
|
|
1940
1942
|
if (existingEntries.length > 0) {
|
|
1941
1943
|
return `${handle}已被标记在咕咕胜点榜黑名单中。`;
|
|
1942
1944
|
}
|
|
1943
1945
|
await ctx.database.upsert("ggcevo_rank", [{
|
|
1944
1946
|
handle,
|
|
1945
|
-
Blacklist: true
|
|
1947
|
+
Blacklist: true,
|
|
1948
|
+
rankseason: config.rankseason
|
|
1946
1949
|
}]);
|
|
1947
1950
|
return `✅ 用户${handle}已被标记在咕咕胜点榜黑名单。`;
|
|
1948
1951
|
} catch (error) {
|
|
@@ -1998,7 +2001,7 @@ ${achievementList.join("\n")}`;
|
|
|
1998
2001
|
"📅 签到记录:",
|
|
1999
2002
|
`最后签到:${chinaTime}`,
|
|
2000
2003
|
`本月累计:${sign.monthlyDays} 天`,
|
|
2001
|
-
|
|
2004
|
+
`拥有金币:${sign.totalRewards} 枚`,
|
|
2002
2005
|
"──────────────"
|
|
2003
2006
|
);
|
|
2004
2007
|
}
|
|
@@ -2191,8 +2194,8 @@ ${achievementList.join("\n")}`;
|
|
|
2191
2194
|
}
|
|
2192
2195
|
}
|
|
2193
2196
|
const [initiatorData, targetData] = await Promise.all([
|
|
2194
|
-
ctx.database.get("ggcevo_rank", initiatorHandle),
|
|
2195
|
-
ctx.database.get("ggcevo_rank", targetHandle)
|
|
2197
|
+
ctx.database.get("ggcevo_rank", { handle: initiatorHandle, rankseason: config.rankseason }),
|
|
2198
|
+
ctx.database.get("ggcevo_rank", { handle: targetHandle, rankseason: config.rankseason })
|
|
2196
2199
|
]);
|
|
2197
2200
|
const initiatorRank = initiatorData[0]?.rank || 0;
|
|
2198
2201
|
const targetRank = targetData[0]?.rank || 0;
|
|
@@ -2449,7 +2452,7 @@ ${validTypes.join("、")}`;
|
|
|
2449
2452
|
ctx.command("ggcevo/装备 <weapon>").action(async ({ session }, weapon) => {
|
|
2450
2453
|
const [profile] = await ctx.database.get("sc2arcade_player", { userId: session.userId });
|
|
2451
2454
|
if (!profile) return "未绑定句柄";
|
|
2452
|
-
if (!weaponConfig[weapon]) return "
|
|
2455
|
+
if (!weaponConfig[weapon]) return "请输入“装备 武器名称”来装备一把你拥有的武器。";
|
|
2453
2456
|
const config2 = weaponConfig[weapon];
|
|
2454
2457
|
const handle = `${profile.regionId}-S2-${profile.realmId}-${profile.profileId}`;
|
|
2455
2458
|
const [owned] = await ctx.database.get("ggcevo_equipment", {
|