v2.0
This commit is contained in:
@@ -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));
|
||||
}
|
||||
Reference in New Issue
Block a user