From 9c93e76e8c77ffc4d6586be7538626c71ddb935f Mon Sep 17 00:00:00 2001 From: Melvin Jones Repol Date: Fri, 5 Jan 2024 23:13:02 +0800 Subject: [PATCH] Initial Commit --- data/accountPreferences.json | 105 +++++++++++++---------------------- index.js | 7 +-- 2 files changed, 41 insertions(+), 71 deletions(-) diff --git a/data/accountPreferences.json b/data/accountPreferences.json index 6be2ecc0..57c67f24 100644 --- a/data/accountPreferences.json +++ b/data/accountPreferences.json @@ -37,18 +37,14 @@ "primary_text_complextion": "gpt-3.5-turbo-16k-0613", "max_image": "6", "apikey": { - "ai": "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", + "ai": "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", "facebook": "6628568379%7Cc1e620fa708a1d5696fb991c1bde5662" }, "cors": [ "https://mrepol742.github.io", "http://0.0.0.0:8000" ], - "restart": [ - "2583856894982516", - "mid.$gAAkuARBgOXSTCjUGmGM2O-9KmcvY", - "61552734637916" - ], + "restart": [], "pin": {} }, "100071743848974": { @@ -88,9 +84,9 @@ "maintenance": false, "tokens": { "gpt": { - "prompt_tokens": 745, - "completion_tokens": 141, - "total_tokens": 886 + "prompt_tokens": 369, + "completion_tokens": 108, + "total_tokens": 477 }, "davinci": { "prompt_tokens": 0, @@ -113,9 +109,9 @@ "maintenance": false, "tokens": { "gpt": { - "prompt_tokens": 6650, - "completion_tokens": 951, - "total_tokens": 7601 + "prompt_tokens": 6159, + "completion_tokens": 868, + "total_tokens": 7027 }, "davinci": { "prompt_tokens": 0, @@ -163,9 +159,9 @@ "maintenance": false, "tokens": { "gpt": { - "prompt_tokens": 91401, - "completion_tokens": 26786, - "total_tokens": 118187 + "prompt_tokens": 69146, + "completion_tokens": 20079, + "total_tokens": 89225 }, "davinci": { "prompt_tokens": 262, @@ -174,7 +170,7 @@ }, "dell": 0 }, - "owner": "100094974786751" + "owner": "100080863321705" }, "61552734637916": { "stop": false, @@ -185,17 +181,17 @@ "selfListen": true, "typingIndicator": false, "autoMarkDelivery": false, - "maintenance": false, + "maintenance": true, "tokens": { "gpt": { - "prompt_tokens": 7559, - "completion_tokens": 1527, - "total_tokens": 9086 + "prompt_tokens": 5625, + "completion_tokens": 1311, + "total_tokens": 6936 }, "davinci": { - "prompt_tokens": 418, - "completion_tokens": 284, - "total_tokens": 702 + "prompt_tokens": 380, + "completion_tokens": 224, + "total_tokens": 604 }, "dell": 0 }, @@ -238,14 +234,14 @@ "maintenance": false, "tokens": { "gpt": { - "prompt_tokens": 3951, - "completion_tokens": 660, - "total_tokens": 4611 + "prompt_tokens": 2377, + "completion_tokens": 402, + "total_tokens": 2779 }, "davinci": { - "prompt_tokens": 412, - "completion_tokens": 118, - "total_tokens": 530 + "prompt_tokens": 0, + "completion_tokens": 0, + "total_tokens": 0 }, "dell": 0 }, @@ -263,14 +259,14 @@ "maintenance": false, "tokens": { "gpt": { - "prompt_tokens": 9508, - "completion_tokens": 2332, - "total_tokens": 11840 + "prompt_tokens": 7915, + "completion_tokens": 2149, + "total_tokens": 10064 }, "davinci": { - "prompt_tokens": 849, - "completion_tokens": 385, - "total_tokens": 1234 + "prompt_tokens": 495, + "completion_tokens": 235, + "total_tokens": 730 }, "dell": 0 }, @@ -288,42 +284,17 @@ "maintenance": false, "tokens": { "gpt": { - "prompt_tokens": 4455, - "completion_tokens": 1130, - "total_tokens": 5585 + "prompt_tokens": 3286, + "completion_tokens": 923, + "total_tokens": 4209 }, "davinci": { - "prompt_tokens": 527, - "completion_tokens": 301, - "total_tokens": 828 + "prompt_tokens": 147, + "completion_tokens": 79, + "total_tokens": 226 }, "dell": 0 }, - "owner": "61554713339075" - }, - "61553801171635": { - "stop": false, - "events": true, - "forceLogin": true, - "autoMarkRead": false, - "online": true, - "selfListen": true, - "typingIndicator": false, - "autoMarkDelivery": false, - "maintenance": false, - "tokens": { - "gpt": { - "prompt_tokens": 1191, - "completion_tokens": 250, - "total_tokens": 1441 - }, - "davinci": { - "prompt_tokens": 35, - "completion_tokens": 9, - "total_tokens": 44 - }, - "dell": 0 - }, - "owner": "61553801171635" + "owner": "61554782822811" } } \ No newline at end of file diff --git a/index.js b/index.js index f2d40a38..9db6b41c 100644 --- a/index.js +++ b/index.js @@ -406,10 +406,9 @@ function redfox_fb(fca_state, login, cb) { let isAppState = true; - if (!(settings.shared.restart[0] && settings.shared.restart[1]) && isCalled && settings.shared.restart[2] == login) { + if (settings.shared.restart && settings.shared.restart[2] == login) { api.sendMessage(updateFont("Successfully restarted", settings.shared.restart[0]), settings.shared.restart[0], settings.shared.restart[1]); - settings.shared.restart = []; - isCalled = false; + delete settings.shared.restart; } api.eventListener(async (err, event) => { @@ -598,7 +597,7 @@ function redfox_fb(fca_state, login, cb) { rs.push(event.threadID); rs.push(event.messageID); rs.push(api.getCurrentUserID()); - settings.shared.restart = rs; + settings.shared["restart"] = rs; sendMessage(api, event, "Restarting program..."); await sleep(2000); process.exit(0);