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-03-04 00:17:21 +00:00 committed by GitHub
parent 608bb55415
commit 604bec72d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)