enhancement(lint): Fix lint errors for src/commands/zeon_message.ts

Co-authored-by: NeonGamerBot-QK <neon@saahild.com>
Signed-off-by: zeon-neon[bot] <136533918+zeon-neon[bot]@users.noreply.github.com>
This commit is contained in:
zeon-neon[bot] 2025-01-31 03:36:51 +00:00 committed by GitHub
parent 213c672b68
commit e937a28857
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,22 +80,21 @@ export default class Message implements Command {
],
}),
},
)
.then((r) => r.text())
let aiReq0 = null;
).then((r) => r.text());
let aiReq0 = null;
try {
aiReq0 = JSON.parse(aiReq00).choices[0].message.content
.replace("```json", "")
.replace("```", "");
} catch (e) {
try {
aiReq0 = JSON.parse(aiReq00)
.choices[0].message.content.replace("```json", "")
.replace("```", "");
} catch (e) {
aiReq0 = aiReq00;
}
// .then((r) =>
// r.choices[0].message.content
// .replace("```json", "")
// .replace("```", ""),
// );
}
// .then((r) =>
// r.choices[0].message.content
// .replace("```json", "")
// .replace("```", ""),
// );
console.log(aiReq0, `api responsne`);
// await app.client.chat.postMessage({
// channel: event.channel,