Chg: pnpm 11.1.3 / Del: helpコマンドとmiqコマンドを除く全てのi18n / Feat: 朝四時に何してるんだい?

This commit is contained in:
2026-05-21 22:22:45 +09:00
parent b2ff3e481a
commit 6fc5ab9d0d
10 changed files with 161 additions and 223 deletions
+28
View File
@@ -0,0 +1,28 @@
import { createUeuse } from "@/lib/client";
import { format } from "date-fns";
import { readFileSync } from "node:fs";
console.log("時報の投稿を行います");
try {
if (new Date().getHours() !== 4) {
await createUeuse({
text: `${format(new Date(), "H:mm")}になりました。`,
}, "時報");
} else {
const asayoziImg = readFileSync(`${import.meta.dirname}/asayozi.png`);
await createUeuse({
text: "朝四時に何してるんだい?",
media: {
photo: [asayoziImg.toString("base64")],
},
}, "時報(午前4時)");
}
process.exit(0);
} catch (err: any) {
console.error("message" in err
? err.message
: err);
process.exit(1);
}