koishi-plugin-ggcevo-game 0.3.18 → 0.3.20
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 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -451,7 +451,7 @@ ${itemDetails.join("\n")}`;
|
|
|
451
451
|
const lastSignChina = convertUTCtoChinaTime(new Date(record.lastSign));
|
|
452
452
|
const targetDateChina = new Date(lastSignChina);
|
|
453
453
|
targetDateChina.setDate(targetDateChina.getDate() + 1);
|
|
454
|
-
const targetDateUTC = new Date(targetDateChina.getTime());
|
|
454
|
+
const targetDateUTC = new Date(targetDateChina.getTime() - 8 * 60 * 60 * 1e3);
|
|
455
455
|
const nowChina = convertUTCtoChinaTime(/* @__PURE__ */ new Date());
|
|
456
456
|
const isToday = targetDateChina.getFullYear() === nowChina.getFullYear() && targetDateChina.getMonth() === nowChina.getMonth() && targetDateChina.getDate() === nowChina.getDate();
|
|
457
457
|
if (isToday) {
|
|
@@ -485,7 +485,7 @@ ${itemDetails.join("\n")}`;
|
|
|
485
485
|
await ctx.database.set("ggcevo_backpack", { handle, itemId: 1 }, {
|
|
486
486
|
quantity: (backpack?.quantity || 0) + tickets
|
|
487
487
|
});
|
|
488
|
-
return `补签成功!已为您补签 ${targetDateChina
|
|
488
|
+
return `补签成功!已为您补签 ${targetDateChina},连续签到 ${newConsecutiveDays} 天,消耗 ${costPoints} 金币,获得 ${points} 金币和 ${tickets} 枚咕咕币`;
|
|
489
489
|
} catch (error) {
|
|
490
490
|
console.error("补签错误:", error);
|
|
491
491
|
return "补签失败,请稍后重试。";
|