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 02:33:34 +00:00 committed by GitHub
parent 007dd75b30
commit 5214aab697
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,19 +77,22 @@ export default class Message implements Command {
},
)
.then((r) => r.json())
.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,
// text: aiReq0,
// });
let aiReq
let aiReq;
try {
aiReq = JSON.parse(aiReq0);
aiReq = JSON.parse(aiReq0);
} catch (e) {
aiReq = { message: `Error:\n`+aiReq0 }
aiReq = { message: `Error:\n` + aiReq0 };
}
const m = await app.client.chat.postMessage({
channel: event.channel,