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