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
608bb55415
commit
604bec72d8
1 changed files with 11 additions and 11 deletions
|
|
@ -17,7 +17,7 @@ const ai = new OpenAI({
|
|||
function zeonMessageCommands(d, r) {
|
||||
// TODO: im eepy buddy
|
||||
}
|
||||
export const bot_try_cache = []
|
||||
export const bot_try_cache = [];
|
||||
export default class Message implements Command {
|
||||
name: string;
|
||||
description: string;
|
||||
|
|
@ -63,12 +63,12 @@ export default class Message implements Command {
|
|||
if (event.bot_id && !bot_try_cache.includes(event.bot_id)) {
|
||||
await app.client.chat.postMessage({
|
||||
channel: event.channel,
|
||||
text: `Hi there robot :3 we should'nt communicate using plain text!! communicate via my telelink :3 (not made yet) (you will see this message once)`
|
||||
})
|
||||
bot_try_cache.push(event.bot_id)
|
||||
text: `Hi there robot :3 we should'nt communicate using plain text!! communicate via my telelink :3 (not made yet) (you will see this message once)`,
|
||||
});
|
||||
bot_try_cache.push(event.bot_id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
await app.client.reactions.add({
|
||||
channel: event.channel,
|
||||
timestamp: event.ts,
|
||||
|
|
@ -85,11 +85,11 @@ export default class Message implements Command {
|
|||
// ],
|
||||
// model: "gpt-3.5-turbo",
|
||||
// })
|
||||
// abort controller of 15s
|
||||
const controller = new AbortController()
|
||||
const timeout = setTimeout(() => {
|
||||
controller.abort()
|
||||
}, 15_000)
|
||||
// abort controller of 15s
|
||||
const controller = new AbortController();
|
||||
const timeout = setTimeout(() => {
|
||||
controller.abort();
|
||||
}, 15_000);
|
||||
const aiReq00 = await fetch(
|
||||
"https://ai.hackclub.com/chat/completions",
|
||||
{
|
||||
|
|
@ -107,7 +107,7 @@ export default class Message implements Command {
|
|||
},
|
||||
).then((r) => r.text());
|
||||
let aiReq0 = null;
|
||||
clearTimeout(timeout)
|
||||
clearTimeout(timeout);
|
||||
|
||||
try {
|
||||
aiReq0 = JSON.parse(aiReq00)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue