Skip to content

Commit 14e4b31

Browse files
feat: update moyu api url
1 parent e3d2f8b commit 14e4b31

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ router.post('/', async (request, env) => {
7575
}
7676
case MO_COMMAND.name.toLowerCase(): {
7777
const response = await fetch(env.MOYU_URL);
78-
const text = await response.text();
78+
const text = await response.json();
7979
return new JsonResponse({
8080
type: InteractionResponseType.CHANNEL_MESSAGE_WITH_SOURCE,
8181
data: {

wrangler.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ routes = [
77

88
[vars]
99
API_URL = "https://awsl.api.awsl.icu"
10-
MOYU_URL = "https://moyu.awsl.icu/api/moyu_txt"
10+
MOYU_URL = "https://moyu.awsl.icu/api/moyu_json"
1111
UOMG_URL = "https://api.uomg.com/api/rand.img3?format=json"
1212

1313

0 commit comments

Comments
 (0)