Skip to content

Commit

Permalink
Revert "temp fixes!!!!!!"
Browse files Browse the repository at this point in the history
This reverts commit 01abe14.
  • Loading branch information
artifishvr committed May 5, 2024
1 parent 01abe14 commit ba033c9
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ client.on("messageCreate", async message => {
try {
if (backendsocket.disconnected) message.channel.send(`🔕 Backend is not connected. Try again later.`);
message.channel.sendTyping();
// enableLocal = await checkLocal();
enableLocal = await checkLocal();

// Conversation reset
if (message.content.startsWith("%reset")) {
Expand Down Expand Up @@ -161,17 +161,17 @@ client.on("messageCreate", async message => {
}
});

// async function checkLocal() {
// let response;
// const sendchat = new Promise((resolve) => {
// backendsocket.emit("localgenenabled", {}, (val) => {
// response = val;
// resolve();
// });
// });
// await sendchat;
// return response;
// }
async function checkLocal() {
let response;
const sendchat = new Promise((resolve) => {
backendsocket.emit("localgenenabled", {}, (val) => {
response = val;
resolve();
});
});
await sendchat;
return response;
}

async function imageRecognition(message) {
if (message.attachments.size > 0 && !backendsocket.disconnected) {
Expand Down

0 comments on commit ba033c9

Please sign in to comment.