Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
waki285 committed Aug 3, 2023
1 parent 3c0e10a commit 3a3755b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ app.post("/interactions", async (c) => {
});
}
});
await fetch(
const res = await fetch(
`https://discord.com/api/v10${Routes.channelMessages(
interaction.channel.id,
)}`,
Expand All @@ -370,12 +370,15 @@ app.post("/interactions", async (c) => {
body: JSON.stringify({
embeds: [
{
description: results
.map(
(x) =>
`${x.key} - GPT4 ${x.gpt4 ? ":o:" : ":x:"} ${x.reason}`,
)
.join("\n"),
description:
results
.map(
(x) =>
`${x.key} - GPT4 ${x.gpt4 ? ":o:" : ":x:"} ${
x.reason
}`,
)
.join("\n") || "none",
},
],
message_reference: {
Expand All @@ -385,6 +388,7 @@ app.post("/interactions", async (c) => {
}),
},
);
logger.debug(await res.json());
return c.json({
type: InteractionResponseType.UpdateMessage,
data: {
Expand Down

0 comments on commit 3a3755b

Please sign in to comment.