2026.4.0-alpha.0
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import client from "@/lib/client";
|
||||
import { format } from "date-fns";
|
||||
import i18next from "i18next";
|
||||
|
||||
export default async function timeNotice() {
|
||||
const response = await client.request("ueuse/create", {
|
||||
text: i18next.t("timeNotice", { time: format(new Date(), "HH:mm") }),
|
||||
});
|
||||
|
||||
if (!response.success) {
|
||||
console.warn("時報投稿に失敗しました:", response.error_code);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("時報投稿:", response.uniqid);
|
||||
}
|
||||
Reference in New Issue
Block a user