Compare commits

...

2 Commits

Author SHA1 Message Date
last2014 a2576f961b APIパスの問題・デバッグ用コメントアウトを修正 2025-08-01 19:53:41 +09:00
last2014 844a9cd058 APIの500問題を修正 2025-08-01 19:39:21 +09:00
5 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "notice-uwuzu", "name": "notice-uwuzu",
"version": "v7.0.1(LTS)@uwuzu1.5.4", "version": "v7.1(LTS)@uwuzu1.5.4",
"description": "Notice Bot for uwuzu", "description": "Notice Bot for uwuzu",
"main": "dist/main.js", "main": "dist/main.js",
"scripts": { "scripts": {
+1 -1
View File
@@ -2,7 +2,7 @@ import { ueuse } from "types/types.js";
import config from "../../config.js"; import config from "../../config.js";
export default async function Follow(data: ueuse) { export default async function Follow(data: ueuse) {
const followReq = await fetch(`https://${config.uwuzu.host}/api/users/follow/`, { const followReq = await fetch(`https://${config.uwuzu.host}/api/users/follow`, {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
token: config.uwuzu.apiToken, token: config.uwuzu.apiToken,
+5 -3
View File
@@ -57,14 +57,16 @@ function alreadyAdd(data: string) {
} }
export default async function Commands() { export default async function Commands() {
const mentions: Array<ueuse> = await (await fetch( const mentionsReq = await fetch(
`https://${config.uwuzu.host}/api/ueuse/mentions/`, { `https://${config.uwuzu.host}/api/ueuse/mentions`, {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
token: config.uwuzu.apiToken, token: config.uwuzu.apiToken,
}), }),
} }
)).json(); );
const mentions: Array<ueuse> = await mentionsReq.json();
console.log("----------------"); console.log("----------------");
console.log("コマンド処理"); console.log("コマンド処理");
+2 -2
View File
@@ -2,7 +2,7 @@ import { ueuse } from "types/types.js";
import config from "../../config.js"; import config from "../../config.js";
export default async function UnFollow(data: ueuse) { export default async function UnFollow(data: ueuse) {
const unfollowReq = await fetch(`https://${config.uwuzu.host}/api/users/unfollow/`, { const unfollowReq = await fetch(`https://${config.uwuzu.host}/api/users/unfollow`, {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
token: config.uwuzu.apiToken, token: config.uwuzu.apiToken,
@@ -14,7 +14,7 @@ export default async function UnFollow(data: ueuse) {
console.log("フォロー解除: ", unfollowRes); console.log("フォロー解除: ", unfollowRes);
const noticeReq = await fetch(`https://${config.uwuzu.host}/api/ueuse/create/`, { const noticeReq = await fetch(`https://${config.uwuzu.host}/api/ueuse/create`, {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
token: config.uwuzu.apiToken, token: config.uwuzu.apiToken,
+2 -3
View File
@@ -476,8 +476,7 @@ async function event(earthquakeInfo: any): Promise<void> {
} }
async function ueuse(text: string) { async function ueuse(text: string) {
console.log(text); const res = await fetch(`https://${config.uwuzu.host}/api/ueuse/create`, {
/*const res = await fetch(`https://${config.uwuzu.host}/api/ueuse/create/`, {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
token: config.uwuzu.apiToken, token: config.uwuzu.apiToken,
@@ -487,7 +486,7 @@ async function ueuse(text: string) {
const resData = await res.json(); const resData = await res.json();
console.log(`地震情報投稿:${JSON.stringify(resData)}`);*/ console.log(`地震情報投稿:${JSON.stringify(resData)}`);
} }
export default function earthquakeNotice(): void { export default function earthquakeNotice(): void {