mirror of
https://github.com/System-End/slack-end.git
synced 2026-04-19 23:22:56 +00:00
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:
parent
213c672b68
commit
e937a28857
1 changed files with 13 additions and 14 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue