This commit is contained in:
2025-06-29 18:56:27 +09:00
parent 761af6eafc
commit 5bd251f6eb
7 changed files with 185 additions and 66 deletions
+25
View File
@@ -0,0 +1,25 @@
import * as dotenv from "dotenv";
import { format } from "date-fns";
import type * as types from "../types";
dotenv.config();
export default async function timeNotice() {
const now = format(new Date(), "HH:mm");
const resUeuse = await fetch(
`https://${process.env.SERVER}/api/ueuse/create`,
{
method: "POST",
body: JSON.stringify({
token: process.env.TOKEN,
text: `${now}になりました`,
}),
},
);
const ueuseData: types.ueuseCreateApi = await resUeuse.json();
console.log(JSON.stringify(ueuseData));
}