-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
55 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"850f2380345327571d06057ea5dbbc49","lockfileHash":"e8325405eaf65ff7657db50a6d790d07"}}} | ||
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"82331401295736b9231b39a7d39fdbb0","lockfileHash":"e8325405eaf65ff7657db50a6d790d07"}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"key":"datr","value":"yyZCZfAoCWWe-b8hsGEKMHVb","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:00.856Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"sb","value":"yyZCZUc_mSDokjud8RpVB1Sa","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.042Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"vpd","value":"v1%3B830x424x2.294114351272583","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.063Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"fr","value":"00TLeUURqctZjAWTx.AWUYXkn6ibfG8bmGfEgJUxYGCiQ.BlQibL.L7.AAA.0.0.BlmiMf.AWU5Vv8qfrE","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.066Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"c_user","value":"61552579757417","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.068Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"xs","value":"24%3ACNNTDukyHDpqtg%3A2%3A1704600351%3A-1%3A10199","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.071Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"fbl_ci","value":"848594360078994","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.073Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"locale","value":"en_US","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.143Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"fbl_st","value":"101621049%3BT%3A28430599","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.145Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"fbl_cs","value":"AhB5itBnFUWY08aGuIf5C59OGHhQN3JVdkgzRFVzaGhDcnhMbkMrNjdSMw","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.148Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"wl_cbv","value":"v2%3Bclient_version%3A2396%3Btimestamp%3A1705835972","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.151Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"m_page_voice","value":"61552579757417","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.154Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"datr","value":"yyZCZfAoCWWe-b8hsGEKMHVb","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:00.856Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"sb","value":"yyZCZUc_mSDokjud8RpVB1Sa","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.042Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"vpd","value":"v1%3B830x424x2.294114351272583","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.063Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"fr","value":"00TLeUURqctZjAWTx.AWUYXkn6ibfG8bmGfEgJUxYGCiQ.BlQibL.L7.AAA.0.0.BlmiMf.AWU5Vv8qfrE","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.066Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"c_user","value":"61552579757417","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.068Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"xs","value":"24%3ACNNTDukyHDpqtg%3A2%3A1704600351%3A-1%3A10199","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.071Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"fbl_ci","value":"848594360078994","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.073Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"locale","value":"en_US","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.143Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"fbl_st","value":"101621049%3BT%3A28430599","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.145Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"fbl_cs","value":"AhB5itBnFUWY08aGuIf5C59OGHhQN3JVdkgzRFVzaGhDcnhMbkMrNjdSMw","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.148Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"wl_cbv","value":"v2%3Bclient_version%3A2396%3Btimestamp%3A1705835972","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.151Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"m_page_voice","value":"61552579757417","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.154Z","lastAccessed":"2024-01-22T12:38:04.278Z"},{"key":"m_page_voice","value":"61552579757417","domain":"messenger.com","path":"/","hostOnly":false,"creation":"2024-01-22T12:38:01.292Z","lastAccessed":"2024-01-22T12:38:04.279Z"}] | ||
[{"key":"datr","value":"yyZCZfAoCWWe-b8hsGEKMHVb","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.718Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"sb","value":"yyZCZUc_mSDokjud8RpVB1Sa","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.922Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"vpd","value":"v1%3B830x424x2.294114351272583","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.940Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"fr","value":"00TLeUURqctZjAWTx.AWUYXkn6ibfG8bmGfEgJUxYGCiQ.BlQibL.L7.AAA.0.0.BlmiMf.AWU5Vv8qfrE","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.941Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"c_user","value":"61552579757417","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.959Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"xs","value":"24%3ACNNTDukyHDpqtg%3A2%3A1704600351%3A-1%3A10199","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.961Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"fbl_ci","value":"848594360078994","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.962Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"locale","value":"en_US","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.963Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"fbl_st","value":"101621049%3BT%3A28430599","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.964Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"fbl_cs","value":"AhB5itBnFUWY08aGuIf5C59OGHhQN3JVdkgzRFVzaGhDcnhMbkMrNjdSMw","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.965Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"wl_cbv","value":"v2%3Bclient_version%3A2396%3Btimestamp%3A1705835972","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.966Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"m_page_voice","value":"61552579757417","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.967Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"datr","value":"yyZCZfAoCWWe-b8hsGEKMHVb","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.718Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"sb","value":"yyZCZUc_mSDokjud8RpVB1Sa","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.922Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"vpd","value":"v1%3B830x424x2.294114351272583","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.940Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"fr","value":"00TLeUURqctZjAWTx.AWUYXkn6ibfG8bmGfEgJUxYGCiQ.BlQibL.L7.AAA.0.0.BlmiMf.AWU5Vv8qfrE","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.941Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"c_user","value":"61552579757417","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.959Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"xs","value":"24%3ACNNTDukyHDpqtg%3A2%3A1704600351%3A-1%3A10199","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.961Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"fbl_ci","value":"848594360078994","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.962Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"locale","value":"en_US","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.963Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"fbl_st","value":"101621049%3BT%3A28430599","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.964Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"fbl_cs","value":"AhB5itBnFUWY08aGuIf5C59OGHhQN3JVdkgzRFVzaGhDcnhMbkMrNjdSMw","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.965Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"wl_cbv","value":"v2%3Bclient_version%3A2396%3Btimestamp%3A1705835972","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.966Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"m_page_voice","value":"61552579757417","domain":"facebook.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.967Z","lastAccessed":"2024-01-22T13:26:21.070Z"},{"key":"m_page_voice","value":"61552579757417","domain":"messenger.com","path":"/","hostOnly":false,"creation":"2024-01-22T13:26:17.981Z","lastAccessed":"2024-01-22T13:26:21.072Z"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
const axios = require('axios'); | ||
|
||
module.exports = { | ||
config: { | ||
name: 'claire', | ||
version: '1.0', | ||
author: 'LiANE @nealianacagara', | ||
role: 0, | ||
category: 'Ai-Chat', | ||
shortDescription: { | ||
en: `Claire is just an AI who makes the most structured and detailed response. Nothing special` | ||
}, | ||
longDescription: { | ||
en: `Claire is just an AI who makes the most structured and detailed response. Nothing special` | ||
}, | ||
guide: { | ||
en: '{pn}claire [query]' | ||
}, | ||
}, | ||
|
||
onStart: async function ({ api, event }) { | ||
try { | ||
const query = args.join(" ") || "hello"; | ||
|
||
if (query) { | ||
api.setMessageReaction("⏳", event.messageID, (err) => console.log(err), true); | ||
const processingMessage = await api.sendMessage( | ||
`Asking ✨ Claire. Please wait a moment...`, | ||
event.threadID | ||
); | ||
|
||
const apiUrl = `https://lianeapi.onrender.com/@LianeAPI_Reworks/api/claire?key=j86bwkwo-8hako-12C&query=${encodeURIComponent(query)}`; | ||
const response = await axios.get(apiUrl); | ||
|
||
if (response.data && response.data.message) { | ||
const trimmedMessage = response.data.message.trim(); | ||
api.setMessageReaction("✅", event.messageID, (err) => console.log(err), true); | ||
await api.sendMessage({ body: trimmedMessage }, event.threadID, event.messageID); | ||
|
||
console.log(`Sent ✨ Claire's response to the user`); | ||
} else { | ||
throw new Error(`Invalid or missing response from ✨ Claire API`); | ||
} | ||
|
||
await api.unsendMessage(processingMessage.messageID); | ||
} | ||
} catch (error) { | ||
console.error(`❌ | Failed to get ✨ Claire's response: ${error.message}`); | ||
const errorMessage = `❌ | An error occurred. You can try typing your query again or resending it. There might be an issue with the server that's causing the problem, and it might resolve on retrying. ${error.message} ${error}`; | ||
api.sendMessage(errorMessage, event.threadID); | ||
} | ||
}, | ||
}; |