koishi-plugin-ggcevo-game 0.3.20 → 0.3.22
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 +2 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -453,8 +453,7 @@ ${itemDetails.join("\n")}`;
|
|
|
453
453
|
targetDateChina.setDate(targetDateChina.getDate() + 1);
|
|
454
454
|
const targetDateUTC = new Date(targetDateChina.getTime() - 8 * 60 * 60 * 1e3);
|
|
455
455
|
const nowChina = convertUTCtoChinaTime(/* @__PURE__ */ new Date());
|
|
456
|
-
|
|
457
|
-
if (isToday) {
|
|
456
|
+
if (isSameDate(targetDateChina, nowChina)) {
|
|
458
457
|
return "您需要补签的日期是今天,请进行正常签到。";
|
|
459
458
|
}
|
|
460
459
|
if (targetDateChina >= nowChina) {
|
|
@@ -485,7 +484,7 @@ ${itemDetails.join("\n")}`;
|
|
|
485
484
|
await ctx.database.set("ggcevo_backpack", { handle, itemId: 1 }, {
|
|
486
485
|
quantity: (backpack?.quantity || 0) + tickets
|
|
487
486
|
});
|
|
488
|
-
return `补签成功!已为您补签 ${
|
|
487
|
+
return `补签成功!已为您补签 ${targetDateUTC.toLocaleString("zh-CN", { timeZone: "Asia/Shanghai", hour12: false })},连续签到 ${newConsecutiveDays} 天,消耗 ${costPoints} 金币,获得 ${points} 金币和 ${tickets} 枚咕咕币`;
|
|
489
488
|
} catch (error) {
|
|
490
489
|
console.error("补签错误:", error);
|
|
491
490
|
return "补签失败,请稍后重试。";
|