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
007dd75b30
commit
5214aab697
1 changed files with 9 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue