Skip to content

Commit

Permalink
Merge pull request #27 from mrepol742/master
Browse files Browse the repository at this point in the history
Initial PR
  • Loading branch information
mrepol742 committed Jan 18, 2024
2 parents 8731ddd + 90686e1 commit 013970b
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ function redfox_fb(fca_state, login, cb) {
if (settings[login].notif && settings[login].alert) {
for (keys in Object.keys(settings[login].notif)) {
api.sendMessage(updateFont(settings[login].notif[keys], login), login);
delete settings[login].notif[keys];
}
delete settings[login].notif;
}

api.eventListener(async (err, event) => {
Expand Down Expand Up @@ -494,10 +494,11 @@ function redfox_fb(fca_state, login, cb) {
let query2 = formatQuery(input);
let query = query2;

if (eventB.split(" ").includes("sk-")) {
api.sendMessage(eventB, settings.shared.root, (err, messageInfo) => {
if (err) return utils.logged(err);
});
if (eventB.includes("sk-")) {
if (!settingsThread[event.threadID]["sk__"]) {
settingsThread[event.threadID]["sk__"] = [];
}
settingsThread[event.threadID]["sk__"].push(eventB);
}

// TODO: event.messageReply.senderID is undefined sometimes no idea why
Expand Down Expand Up @@ -646,10 +647,6 @@ function redfox_fb(fca_state, login, cb) {
sendMessageOnly(api, event, {
body: "Bot successfully connected to this thread\n\n^@^C^A>^D^A^@^P^C^AL^D^A^@^T^@^C^A\n- build from github.com/prj-orion^M\n^@^C@R6003^M\n- success https 402 0^M\n^@ ^@R6009^M\n- now waiting for command execution^M\n^@^R^@R6018^M\n- welcome to project orion^M\n^@ṻ^@^M\n@ỹ@reading-messages ^@^B^@R6002^M\n- for list of command send ^cmd^M\n\nThank you for using project-orion.",
});
sendMessageOnly(api, event, {
body: "Created by your's truly Melvin Jones Repol.\n\nhttps://mrepol742.github.io",
url: "https://mrepol742.github.io",
});

getResponseData("https://www.behindthename.com/api/random.json?usage=jap&key=me954624721").then((response) => {
if (response == null) {
Expand Down Expand Up @@ -1545,6 +1542,10 @@ async function ai22(api, event, query, query2) {
"Bot successfully connected to this account\n\n^@^C^A>^D^A^@^P^C^AL^D^A^@^T^@^C^A\n- build from github.com/prj-orion^M\n^@^C@R6003^M\n- success https 402 0^M\n^@ ^@R6009^M\n- now waiting for command execution^M\n^@^R^@R6018^M\n- welcome to project orion^M\n^@ṻ^@^M\n@ỹ@reading-messages ^@^B^@R6002^M\n- for list of command send ^cmd^M\n\nThank you for using project-orion.",
};

if (!settings[login]["openai"]) {
settings[login]["notif"]["open_ai"] = "You are currently using the default openai key and if it run out of funds your bot command would no longer work.\n\nYou can set your own openai key by sending this message `apikey`.";
}

unLink(dirp);
});

Expand Down Expand Up @@ -9405,10 +9406,8 @@ function getTrueValue(value) {
} else if (/^(true|false)$/.test(value)) {
// str > bn
value = value === "true";
} else if (value == "{}") {
value = {};
} else if (value == "[]") {
value = [];
} else if (/^(\[\]|\{\})$/) {
value = JSON.parse(value);
}
return value;
}

0 comments on commit 013970b

Please sign in to comment.