From 52382d7b4ba27f3ea58aaacf0cc9f4dafdf750e2 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:33:47 +0800 Subject: [PATCH 001/121] Update ai.js --- scripts/cmds/ai.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 scripts/cmds/ai.js diff --git a/scripts/cmds/ai.js b/scripts/cmds/ai.js new file mode 100644 index 0000000000..7387fe406e --- /dev/null +++ b/scripts/cmds/ai.js @@ -0,0 +1,5 @@ +const axios=require('axios'); + +const apiEndpoint='https://sandipapi.onrender.com/gpt'; + +module.exports={config:{name:"ai",version:1.0,author:"coffee",longDescription:"AI",category:"ai",guide:{en:"{p}questions"}},onStart:async()=>{},onChat:async({event,message})=>{try{const{body}=event;if(!(body&&body.toLowerCase().startsWith("ai")))return;const prompt=body.substring(2).trim();if(!prompt)return await message.reply("๐€๐๐’๐„๐‹|๐ŸŒ \nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”\nHi! Ask me anything!\nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”");const response=await axios.get(`${apiEndpoint}?prompt=${encodeURIComponent(prompt)}`);if(response.status===200)await message.reply(`๐€๐๐’๐„๐‹ ๐€๐๐’๐–๐„๐‘๐„๐ƒ|โœ…\nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”\n${response.data.answer}\nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”`);else throw new Error(`Failed to fetch data. Status: ${response.status}`);}catch(error){console.error("Error:",error.message);}}}; \ No newline at end of file From d75924221e30df7868e5b33aa780914eff4985a0 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:39:33 +0800 Subject: [PATCH 002/121] Update prefix.js --- scripts/cmds/prefix.js | 190 +++++++++++++++++++---------------------- 1 file changed, 88 insertions(+), 102 deletions(-) diff --git a/scripts/cmds/prefix.js b/scripts/cmds/prefix.js index fe933a62f6..3b6e60c8a2 100644 --- a/scripts/cmds/prefix.js +++ b/scripts/cmds/prefix.js @@ -1,103 +1,89 @@ -const fs = require("fs-extra"); -const { utils } = global; - -module.exports = { - config: { - name: "prefix", - version: "1.4", - author: "NTKhang", - countDown: 5, - role: 0, - description: "Thay ฤ‘แป•i dแบฅu lแป‡nh cแปงa bot trong box chat cแปงa bแบกn hoแบทc cแบฃ hแป‡ thแป‘ng bot (chแป‰ admin bot)", - category: "config", - guide: { - vi: " {pn} : thay ฤ‘แป•i prefix mแป›i trong box chat cแปงa bแบกn" - + "\n Vรญ dแปฅ:" - + "\n {pn} #" - + "\n\n {pn} -g: thay ฤ‘แป•i prefix mแป›i trong hแป‡ thแป‘ng bot (chแป‰ admin bot)" - + "\n Vรญ dแปฅ:" - + "\n {pn} # -g" - + "\n\n {pn} reset: thay ฤ‘แป•i prefix trong box chat cแปงa bแบกn vแป mแบทc ฤ‘แป‹nh", - en: " {pn} : change new prefix in your box chat" - + "\n Example:" - + "\n {pn} #" - + "\n\n {pn} -g: change new prefix in system bot (only admin bot)" - + "\n Example:" - + "\n {pn} # -g" - + "\n\n {pn} reset: change prefix in your box chat to default" - } - }, - - langs: { - vi: { - reset: "ฤรฃ reset prefix cแปงa bแบกn vแป mแบทc ฤ‘แป‹nh: %1", - onlyAdmin: "Chแป‰ admin mแป›i cรณ thแปƒ thay ฤ‘แป•i prefix hแป‡ thแป‘ng bot", - confirmGlobal: "Vui lรฒng thแบฃ cแบฃm xรบc bแบฅt kแปณ vร o tin nhแบฏn nร y ฤ‘แปƒ xรกc nhแบญn thay ฤ‘แป•i prefix cแปงa toร n bแป™ hแป‡ thแป‘ng bot", - confirmThisThread: "Vui lรฒng thแบฃ cแบฃm xรบc bแบฅt kแปณ vร o tin nhแบฏn nร y ฤ‘แปƒ xรกc nhแบญn thay ฤ‘แป•i prefix trong nhรณm chat cแปงa bแบกn", - successGlobal: "ฤรฃ thay ฤ‘แป•i prefix hแป‡ thแป‘ng bot thร nh: %1", - successThisThread: "ฤรฃ thay ฤ‘แป•i prefix trong nhรณm chat cแปงa bแบกn thร nh: %1", - myPrefix: "๐ŸŒ Prefix cแปงa hแป‡ thแป‘ng: %1\n๐Ÿ›ธ Prefix cแปงa nhรณm bแบกn: %2" - }, - en: { - reset: "Your prefix has been reset to default: %1", - onlyAdmin: "Only admin can change prefix of system bot", - confirmGlobal: "Please react to this message to confirm change prefix of system bot", - confirmThisThread: "Please react to this message to confirm change prefix in your box chat", - successGlobal: "Changed prefix of system bot to: %1", - successThisThread: "Changed prefix in your box chat to: %1", - myPrefix: "๐ŸŒ System prefix: %1\n๐Ÿ›ธ Your box chat prefix: %2" - } - }, - - onStart: async function ({ message, role, args, commandName, event, threadsData, getLang }) { - if (!args[0]) - return message.SyntaxError(); - - if (args[0] == 'reset') { - await threadsData.set(event.threadID, null, "data.prefix"); - return message.reply(getLang("reset", global.GoatBot.config.prefix)); - } - - const newPrefix = args[0]; - const formSet = { - commandName, - author: event.senderID, - newPrefix - }; - - if (args[1] === "-g") - if (role < 2) - return message.reply(getLang("onlyAdmin")); - else - formSet.setGlobal = true; - else - formSet.setGlobal = false; - - return message.reply(args[1] === "-g" ? getLang("confirmGlobal") : getLang("confirmThisThread"), (err, info) => { - formSet.messageID = info.messageID; - global.GoatBot.onReaction.set(info.messageID, formSet); - }); - }, - - onReaction: async function ({ message, threadsData, event, Reaction, getLang }) { - const { author, newPrefix, setGlobal } = Reaction; - if (event.userID !== author) - return; - if (setGlobal) { - global.GoatBot.config.prefix = newPrefix; - fs.writeFileSync(global.client.dirConfig, JSON.stringify(global.GoatBot.config, null, 2)); - return message.reply(getLang("successGlobal", newPrefix)); - } - else { - await threadsData.set(event.threadID, newPrefix, "data.prefix"); - return message.reply(getLang("successThisThread", newPrefix)); - } - }, - - onChat: async function ({ event, message, getLang }) { - if (event.body && event.body.toLowerCase() === "prefix") - return () => { - return message.reply(getLang("myPrefix", global.GoatBot.config.prefix, utils.getPrefix(event.threadID))); - }; - } +const fs = require("fs-extra"); +const { utils } = global; + +module.exports = { + config: { + name: "prefix", + alias: ["๐Ÿง‹"], + version: "1.3", + author: "NTKhang", + countDown: 5, + role: 0, + shortDescription: "Change bot prefix", + longDescription: "Change the bot's command symbol in your chat box or the entire bot system (admin only)", + category: "box chat", + guide: { + en: " {pn} : change new prefix in your box chat" + + "\n Example:" + + "\n {pn} #" + + "\n\n {pn} -g: change new prefix in system bot (only admin bot)" + + "\n Example:" + + "\n {pn} # -g" + + "\n\n {pn} reset: change prefix in your box chat to default" + } + }, + + langs: { + en: { + reset: "Your prefix has been reset to default: %1", + onlyAdmin: "Only admin can change prefix of system bot", + confirmGlobal: "Please react to this message to confirm change prefix of system bot", + confirmThisThread: "Please react to this message to confirm change prefix in your box chat", + successGlobal: "Changed prefix of system bot to: %1", + successThisThread: "Changed prefix in your box chat to: %1", + myPrefix: "๐Ÿ–๏ธ| ๐™ท๐šŽ๐š•๐š•๐š˜ ๐™ต๐š›๐š’๐šŽ๐š—๐š |๐Ÿ–๏ธ\n๐šƒ๐š‘๐š’๐šœ ๐š’๐šœ ๐š–๐šข ๐™ฟ๐š›๐šŽ๐š๐š’๐šก [ %2 ]\n\nHere's the commands that you can use:\n\nโ”โ” ๐Ÿ“– | ๐™ด๐š๐šž๐šŒ๐šŠ๐š๐š’๐š˜๐š— โ”โ”\nai <๐‘ž๐‘ข๐‘’๐‘ ๐‘ก๐‘–๐‘œ๐‘›>\n%2bard <๐‘ž๐‘ข๐‘’๐‘ ๐‘ก๐‘–๐‘œ๐‘›>\n%2gpt <๐‘ž๐‘ข๐‘’๐‘ ๐‘ก๐‘–๐‘œ๐‘›>\n%2liner <๐‘ž๐‘ข๐‘’๐‘ ๐‘ก๐‘–๐‘œ๐‘›>\n%2gemini <๐‘ž๐‘ข๐‘’๐‘ ๐‘ก๐‘–๐‘œ๐‘›>\n\nโ”โ” ๐Ÿ–ผ | ๐™ธ๐š–๐šŠ๐š๐šŽ โ”โ”\n%2pinterest <๐‘๐‘Ž๐‘ก> <-5>\n%2imagine <๐‘๐‘Ÿ๐‘œ๐‘š๐‘๐‘ก>\n%2prodia <๐‘๐‘Ÿ๐‘œ๐‘š๐‘๐‘ก>\n%2remini <๐‘Ÿ๐‘’๐‘๐‘™๐‘ฆ ๐‘ก๐‘œ ๐‘–๐‘š๐‘Ž๐‘”๐‘’>\n%2image2text \n<๐‘Ÿ๐‘’๐‘๐‘™๐‘ฆ ๐‘ก๐‘œ ๐‘–๐‘š๐‘Ž๐‘”๐‘’>\n\nโ”โ” ๐Ÿ“ป | ๐™ผ๐šž๐šœ๐š’๐šŒ โ”โ”\n%2lyrics <๐‘ก๐‘–๐‘ก๐‘™๐‘’ ๐‘๐‘ฆ ๐‘Ž๐‘Ÿ๐‘ก๐‘–๐‘ ๐‘ก>\n%2song <๐‘ก๐‘–๐‘ก๐‘™๐‘’ ๐‘๐‘ฆ ๐‘Ž๐‘Ÿ๐‘ก๐‘–๐‘ ๐‘ก>\n%2play <๐‘ก๐‘–๐‘ก๐‘™๐‘’ | ๐‘Ž๐‘Ÿ๐‘ก๐‘–๐‘ ๐‘ก>\n%2video <๐‘ก๐‘–๐‘ก๐‘™๐‘’ ๐‘๐‘ฆ ๐‘Ž๐‘Ÿ๐‘ก๐‘–๐‘ ๐‘ก>\n\nChat -๐š‘๐šŽ๐š•๐š™ to see more!" + } + }, + + onStart: async function ({ message, role, args, commandName, event, threadsData, getLang }) { + if (!args[0]) + return message.SyntaxError(); + + if (args[0] == 'reset') { + await threadsData.set(event.threadID, null, "data.prefix"); + return message.reply(getLang("reset", global.GoatBot.config.prefix)); + } + + const newPrefix = args[0]; + const formSet = { + commandName, + author: event.senderID, + newPrefix + }; + + if (args[1] === "-g") + if (role < 2) + return message.reply(getLang("onlyAdmin")); + else + formSet.setGlobal = true; + else + formSet.setGlobal = false; + + return message.reply(args[1] === "-g" ? getLang("confirmGlobal") : getLang("confirmThisThread"), (err, info) => { + formSet.messageID = info.messageID; + global.GoatBot.onReaction.set(info.messageID, formSet); + }); + }, + + onReaction: async function ({ message, threadsData, event, Reaction, getLang }) { + const { author, newPrefix, setGlobal } = Reaction; + if (event.userID !== author) + return; + if (setGlobal) { + global.GoatBot.config.prefix = newPrefix; + fs.writeFileSync(global.client.dirConfig, JSON.stringify(global.GoatBot.config, null, 2)); + return message.reply(getLang("successGlobal", newPrefix)); + } + else { + await threadsData.set(event.threadID, newPrefix, "data.prefix"); + return message.reply(getLang("successThisThread", newPrefix)); + } + }, + + onChat: async function ({ event, message, getLang }) { + if (event.body && (event.body.toLowerCase() === "prefix" || event.body.toLowerCase() === "๐Ÿง‹")) + return () => { + return message.reply(getLang("myPrefix", global.GoatBot.config.prefix, utils.getPrefix(event.threadID))); + }; + } }; \ No newline at end of file From e9ed33384281896a722e95ce16db2dc4e970356a Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:40:55 +0800 Subject: [PATCH 003/121] Update help.js --- scripts/cmds/help.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmds/help.js b/scripts/cmds/help.js index 6758faf2c8..d6cdb0512d 100644 --- a/scripts/cmds/help.js +++ b/scripts/cmds/help.js @@ -3,7 +3,7 @@ const axios = require("axios"); const path = require("path"); const { getPrefix } = global.utils; const { commands, aliases } = global.GoatBot; -const doNotDelete = "[ ๐Ÿ | Goat Bot V2 ]"; +const doNotDelete = "["[MENTION ADMIN WHEN BOT IS DIE โžก๏ธANSELMO]";]"; /** * @author NTKhang * @author: do not delete it From 8e6e6de51256e7cdb931ee0ce6d97e27700da90d Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:52:40 +0800 Subject: [PATCH 004/121] Update adc.js --- scripts/cmds/adc.js | 113 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 scripts/cmds/adc.js diff --git a/scripts/cmds/adc.js b/scripts/cmds/adc.js new file mode 100644 index 0000000000..af4c0f6ee2 --- /dev/null +++ b/scripts/cmds/adc.js @@ -0,0 +1,113 @@ +module.exports = { + config: { + name: "adc", + aliases: ["adc"], + version: "1.2", + author: "Loid Butter",//Follow Loid Senpai FB https://www.facebook.com/loidofficiaI + countDown: 5, + role: 2, + shortDescription: { + vi: "", + en: "adc command" + }, + longDescription: { + vi: "", + en: "only bot owner" + }, + category: "owner", + guide: { + en: "{pn}" + } + }, + +onStart: async function({ api, event, args }) { + const permission = ["100025154265080"]; + if (!permission.includes(event.senderID)) + return api.sendMessage("โŒ | You aren't allowed to use this command check the adc command,", event.threadID, event.messageID); + const axios = require('axios'); + const fs = require('fs'); + const request = require('request'); + const cheerio = require('cheerio'); + const { join, resolve } = require("path"); + const { senderID, threadID, messageID, messageReply, type } = event; + var name = args[0]; + if (type == "message_reply") { + var text = messageReply.body; + } + if(!text && !name) return api.sendMessage('Please reply to the link you want to apply the code to or write the file name to upload the code to pastebin!', threadID, messageID); + if(!text && name) { + var data = fs.readFile( + `${__dirname}/${args[0]}.js`, + "utf-8", + async (err, data) => { + if (err) return api.sendMessage(`Command ${args[0]} does not exist!.`, threadID, messageID); + const { PasteClient } = require('pastebin-api') + const client = new PasteClient("N5NL5MiwHU6EbQxsGtqy7iaodOcHithV"); + async function pastepin(name) { + const url = await client.createPaste({ + code: data, + expireDate: 'N', + format: "javascript", + name: name, + publicity: 1 + }); + var id = url.split('/')[3] + return 'https://pastebin.com/raw/' + id + } + var link = await pastepin(args[1] || 'noname') + return api.sendMessage(link, threadID, messageID); + } + ); + return + } + var urlR = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/ + var url = text.match(urlR); + if (url[0].indexOf('pastebin') !== -1) { + axios.get(url[0]).then(i => { + var data = i.data + fs.writeFile( + `${__dirname}/${args[0]}.js`, + data, + "utf-8", + function (err) { + if (err) return api.sendMessage(`An error occurred while applying the code ${args[0]}.js`, threadID, messageID); + api.sendMessage(`Applied the code to ${args[0]}.js, use command load to use!`, threadID, messageID); + } + ); + }) + } + + if (url[0].indexOf('buildtool') !== -1 || url[0].indexOf('tinyurl.com') !== -1) { + const options = { + method: 'GET', + url: messageReply.body + }; + request(options, function (error, response, body) { + if (error) return api.sendMessage('Please only reply to the link (doesnt contain anything other than the link)', threadID, messageID); + const load = cheerio.load(body); + load('.language-js').each((index, el) => { + if (index !== 0) return; + var code = el.children[0].data + fs.writeFile(`${__dirname}/${args[0]}.js`, code, "utf-8", + function (err) { + if (err) return api.sendMessage(`An error occurred while applying the new code to "${args[0]}.js".`, threadID, messageID); + return api.sendMessage(`Added this code "${args[0]}.js", use command load to use!`, threadID, messageID); + } + ); + }); + }); + return + } + if (url[0].indexOf('drive.google') !== -1) { + var id = url[0].match(/[-\w]{25,}/) + const path = resolve(__dirname, `${args[0]}.js`); + try { + await utils.downloadFile(`https://drive.google.com/u/0/uc?id=${id}&export=download`, path); + return api.sendMessage(`Added this code "${args[0]}.js" If there is an error, change the drive file to txt!`, threadID, messageID); + } + catch(e) { + return api.sendMessage(`An error occurred while applying the new code to "${args[0]}.js".`, threadID, messageID); + } + } + } +} \ No newline at end of file From e60c3ee56f8f747ba914c68cac84b00517f0c220 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:55:16 +0800 Subject: [PATCH 005/121] Update uptime.js --- scripts/cmds/uptime.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/cmds/uptime.js diff --git a/scripts/cmds/uptime.js b/scripts/cmds/uptime.js new file mode 100644 index 0000000000..93d20aec9f --- /dev/null +++ b/scripts/cmds/uptime.js @@ -0,0 +1,37 @@ +module.exports = { + config: { + name: "uptime", +aliases: ["upt"], + version: "1.0", + author: "OtinXSandip", + role: 0, + shortDescription: { + en: "Displays the total number of users of the bot and check uptime " + }, + longDescription: { + en: "Displays the total number of users who have interacted with the bot and check uptime." + }, + category: "box chat", + guide: { + en: "Use {p}totalusers to display the total number of users of the bot and check uptime." + } + }, + onStart: async function ({ api, event, args, usersData, threadsData }) { + try { + const allUsers = await usersData.getAll(); + const allThreads = await threadsData.getAll(); + const uptime = process.uptime(); + + const hours = Math.floor(uptime / 3600); + const minutes = Math.floor((uptime % 3600) / 60); + const seconds = Math.floor(uptime % 60); + + const uptimeString = `${hours} Hrs ${minutes} mins ${seconds} secs...`; + + api.sendMessage(`ANSEL ACTIVE โš™๏ธโžก๏ธใ€Œ ๐™พ๐š—๐š•๐š’๐š—๐šŽ ใ€\n ${uptimeString}`, event.threadID); + } catch (error) { + console.error(error); + api.sendMessage("An error occurred while retrieving data.", event.threadID); + } + } +}; \ No newline at end of file From 62068c574ce64eb6ac1e206cb96b8d04e55394a2 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:56:53 +0800 Subject: [PATCH 006/121] Update config.dev.json From 4c3666477ed0366b824dacbb874760edbdc2d48b Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:02:17 +0800 Subject: [PATCH 007/121] Update config.dev.json --- config.json | 282 ++++++++++++++++++++++++++-------------------------- 1 file changed, 139 insertions(+), 143 deletions(-) diff --git a/config.json b/config.json index b9aebbbeea..2f14377e95 100644 --- a/config.json +++ b/config.json @@ -1,145 +1,141 @@ { - "facebookAccount": { - "email": "", - "password": "", - "2FASecret": "", - "i_user": "", - "proxy": null, - "userAgent": "Mozilla/5.0 (Linux; Android 12; M2102J20SG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Mobile Safari/537.36", - "intervalGetNewCookie": 1440, - "notes": "time the system automatically retrieves new cookies from email/password, unit is minute, if you set null, the system will not automatically retrieve new cookies, it saves you from having to manually change your cookie every time it expires. recommended set to 1440 (1day) or 4320 (3day).TO BE ABLE TO USE THIS FEATURE YOU NEED TO ENTER THE ACCOUNT PASSWORD ABOVE" - }, - "antiInbox": false, - "language": "en", - "notesLanguage": "change to your language with ISO 639-1 code, available languages: vi (Vietnamese), en (English)", - "nickNameBot": "GoatBot", - "prefix": "-", - "adminOnly": { - "enable": false, - "ignoreCommand": [] - }, - "adminBot": [], - "whiteListMode": { - "enable": false, - "whiteListIds": [], - "notes": "if you enable this feature, only the ids in the whiteListIds list can use the bot" - }, - "whiteListModeThread": { - "enable": false, - "whiteListThreadIds": [], - "notes": "if you enable this feature, only the thread in the whiteListThreadIds list can use the bot", - "how_it_work": "if you enable both whiteListMode and whiteListModeThread, the system will check if the user is in whiteListIds, then check if the thread is in whiteListThreadIds, if one of the conditions is true, the user can use the bot" - }, - "database": { - "type": "sqlite", - "uriMongodb": "", - "autoSyncWhenStart": false, - "autoRefreshThreadInfoFirstTime": true, - "notes": "(1) type selects 'json' or 'sqlite' or 'mongodb'. If you choose mongodb, enter uri connect mongodb in the uriMongodb section, instructions to get uri connect mongodb at: https://youtu.be/z1f9urHW5xY. I recommend using 'mongodb' or 'sqlite', json is not recommended because it is not stable. (2) when you set autoSyncWhenStart to true, the bot will automatically synchronize the data in the database when starting the bot, this will make the bot start slower. (3) when you set autoRefreshThreadInfoFirstTime to true, the bot will automatically refresh the thread information when get first message from the thread since starting the bot" - }, - "timeZone": "Asia/Ho_Chi_Minh", - "credentials": { - "gmailAccount": { - "email": "", - "clientId": "", - "clientSecret": "", - "refreshToken": "", - "apiKey": "" - }, - "gRecaptcha": { - "siteKey": "", - "secretKey": "" - } - }, - "dashBoard": { - "enable": true, - "expireVerifyCode": 300000, - "port": 3001 - }, - "serverUptime": { - "enable": false, - "port": 3001, - "socket": { - "enable": true, - "channelName": "uptime", - "verifyToken": "" - } - }, - "autoRestart": { - "time": null, - "notes": "you can set time is interval with milisecond or cron time, example: 1000, 10000, 60000, 3600000, 86400000, 0 0 * * *,... docs: https://www.npmjs.com/package/node-cron. If you set time is 0 or false or null, the bot will not auto restart" - }, - "autoUptime": { - "enable": false, - "timeInterval": 180, - "url": "", - "notes": "the value of timeInterval is seconds, url is the url you want to send the request to (automatically detected for hosting glitch or replit)" - }, - "autoLoadScripts": { - "enable": false, - "ignoreCmds": "", - "ignoreEvents": "", - "notes": "this feature will automatically load the script when scripts have been changed, you can set ignoreCmds to ignore commands, ignoreEvents to ignore events, separate by comma or space, example: \"cmd1.js cmd2.js cmd3.js\" (without backslash)" - }, - "autoRefreshFbstate": true, - "autoReloginWhenChangeAccount": false, - "autoRestartWhenListenMqttError": false, - "restartListenMqtt": { - "enable": true, - "timeRestart": 3600000, - "delayAfterStopListening": 2000, - "logNoti": true, - "notes": "the value of timeRestart and delayAfterStopListening is milisecond, You shouldn't edit this if you don't know what it is" - }, - "notiWhenListenMqttError": { - "notes": "This is the message when the bot is listening to the mqtt server and the mqtt server stops working due to account problems such as: locked acc, blocked due to spam,... bot will automatically send notifications to parts of your settings. You must change enable to true to use this feature. See bot/login/handlerWhenListenHasError.js file for details on how it works", - "gmail": { - "enable": false, - "emailGetNoti": "", - "note": "Bot will use gmailAccount to send email to emailGetNoti, can send notifications to many email, separate by comma or space, example: \"example1@gmail.com example2@gmail.com\" (without backslash)" - }, - "telegram": { - "enable": false, - "botToken": "", - "chatId": "", - "note": "Can send notifications to many chatId, separate by comma or space, example: \"123456789 987654321\" (without backslash)" - }, - "discordHook": { - "enable": false, - "webhookUrl": "", - "note": "Can send notifications to many webhookUrl, separate by comma or space, example: \"https://discord.com/api/webhooks/123456789/123456789 https://discord.com/api/webhooks/987654321/987654321\" (without backslash)" - } - }, - "hideNotiMessage": { - "commandNotFound": false, - "adminOnly": false, - "threadBanned": false, - "userBanned": false, - "needRoleToUseCmd": false, - "needRoleToUseCmdOnReply": false, - "needRoleToUseCmdOnReaction": false - }, - "logEvents": { - "disableAll": false, - "message": true, - "message_reaction": true, - "message_unsend": true, - "message_reply": true, - "event": true, - "read_receipt": false, - "typ": false, - "presence": false - }, - "optionsFca": { - "forceLogin": true, - "listenEvents": true, - "updatePresence": true, - "listenTyping": true, - "logLevel": "error", - "selfListen": false, - "selfListenEvent": true, - "autoMarkDelivery": false, - "autoReconnect": false, - "notes": "Document here: https://github.com/ntkhang03/fb-chat-api/blob/master/DOCS.md#apisetoptionsoptions " - } + "facebookAccount": { + "email": "", + "password": "", + "2FASecret": "", + "i_user": "", + "proxy": null, + "userAgent": "Mozilla/5.0 (Linux; Android 12; M2102J20SG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Mobile Safari/537.36", + "intervalGetNewCookie": 1440, + "notes": "time the system automatically retrieves new cookies from email/password, unit is minute, if you set null, the system will not automatically retrieve new cookies, it saves you from having to manually change your cookie every time it expires. recommended set to 1440 (1day) or 4320 (3day).TO BE ABLE TO USE THIS FEATURE YOU NEED TO ENTER THE ACCOUNT PASSWORD ABOVE" + }, + "antiInbox": false, + "language": "en", + "notesLanguage": "change to your language with ISO 639-1 code, available languages: vi (Vietnamese), en (English)", + "adminOnly": { + "enable": false, + "ignoreCommand": [] + }, + "adminBot": [ + "100025154265080" + ], + "whiteListMode": { + "enable": false, + "whiteListIds": [], + "notes": "if you enable this feature, only the ids in the whiteListIds section can use the bot" + }, + "nickNameBot": "ANSELEX1LED|๐Ÿค–", + "prefix": "-", + "database": { + "type": "sqlite", + "uriMongodb": "", + "autoSyncWhenStart": false, + "autoRefreshThreadInfoFirstTime": true, + "notes": "(1) type selects 'json' or 'sqlite' or 'mongodb'. If you choose mongodb, enter uri connect mongodb in the uriMongodb section, instructions to get uri connect mongodb at: https://youtu.be/z1f9urHW5xY. I recommend using 'mongodb' or 'sqlite', json is not recommended because it is not stable. (2) when you set autoSyncWhenStart to true, the bot will automatically synchronize the data in the database when starting the bot, this will make the bot start slower. (3) when you set autoRefreshThreadInfoFirstTime to true, the bot will automatically refresh the thread information when get first message from the thread since starting the bot" + }, + "timeZone": "Asia/Ho_Chi_Minh", + "credentials": { + "gmailAccount": { + "email": "kramn1205@gmail.com", + "clientId": "407168939339-ni7uvp8054bpnht4280n6d3no4qrf3mv.apps.googleusercontent.com", + "clientSecret": "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", + "refreshToken": "1//041Aj0DBzlyxuCgYIARAAGAQSNwF-L9IrSJFfXahDmIC5CaNNthQwg0yT8ZrFaUUofZBR13qsh-nNBLi7_4LZMlZ00F8AiWo6Moo", + "apiKey": "" + }, + "gRecaptcha": { + "siteKey": "6LdtgYMoAAAAABS1V6_RlEsUXf7dNLIzbc4EPhbt", + "secretKey": "6LdtgYMoAAAAAKXtH5f06qZBq28VXXqOb6rOSGQ5" + } + }, + "dashBoard": { + "enable": true, + "expireVerifyCode": 300000, + "port": 3001 + }, + "serverUptime": { + "enable": false, + "port": 3001, + "socket": { + "enable": true, + "channelName": "uptime", + "verifyToken": "" + } + }, + "autoRestart": { + "time": false, + "notes": "you can set time is interval with milisecond or cron time, example: 1000, 10000, 60000, 3600000, 86400000, 0 0 * * *,... docs: https://www.npmjs.com/package/node-cron. If you set time is 0 or false or null, the bot will not auto restart" + }, + "autoUptime": { + "enable": false, + "timeInterval": 180, + "url": "", + "notes": "the value of timeInterval is seconds, url is the url you want to send the request to (automatically detected for hosting glitch or replit)" + }, + "autoLoadScripts": { + "enable": false, + "ignoreCmds": "", + "ignoreEvents": "", + "notes": "this feature will automatically load the script when scripts have been changed, you can set ignoreCmds to ignore commands, ignoreEvents to ignore events, separate by comma or space, example: \"cmd1.js cmd2.js cmd3.js\" (without backslash)" + }, + "autoRefreshFbstate": true, + "autoReloginWhenChangeAccount": false, + "autoRestartWhenListenMqttError": false, + "restartListenMqtt": { + "enable": true, + "timeRestart": 3600000, + "delayAfterStopListening": 2000, + "logNoti": true, + "notes": "the value of timeRestart and delayAfterStopListening is milisecond, You shouldn't edit this if you don't know what it is" + }, + "notiWhenListenMqttError": { + "notes": "This is the message when the bot is listening to the mqtt server and the mqtt server stops working due to account problems such as: locked acc, blocked due to spam,... bot will automatically send notifications to parts of your settings. You must change enable to true to use this feature. See bot/login/handlerWhenListenHasError.js file for details on how it works", + "gmail": { + "enable": false, + "emailGetNoti": "", + "note": "Bot will use gmailAccount to send email to emailGetNoti, can send notifications to many email, separate by comma or space, example: \"example1@gmail.com example2@gmail.com\" (without backslash)" + }, + "telegram": { + "enable": false, + "botToken": "", + "chatId": "", + "note": "Can send notifications to many chatId, separate by comma or space, example: \"123456789 987654321\" (without backslash)" + }, + "discordHook": { + "enable": false, + "webhookUrl": "", + "note": "Can send notifications to many webhookUrl, separate by comma or space, example: \"https://discord.com/api/webhooks/123456789/123456789 https://discord.com/api/webhooks/987654321/987654321\" (without backslash)" + } + }, + "hideNotiMessage": { + "commandNotFound": false, + "adminOnly": false, + "threadBanned": false, + "userBanned": false, + "needRoleToUseCmd": false, + "needRoleToUseCmdOnReply": false, + "needRoleToUseCmdOnReaction": false + }, + "logEvents": { + "disableAll": false, + "message": true, + "message_reaction": true, + "message_unsend": true, + "message_reply": true, + "event": true, + "read_receipt": false, + "typ": false, + "presence": false + }, + "optionsFca": { + "forceLogin": true, + "listenEvents": true, + "updatePresence": true, + "listenTyping": true, + "logLevel": "error", + "selfListen": false, + "selfListenEvent": true, + "autoMarkDelivery": false, + "autoReconnect": false, + "notes": "Document here: https://github.com/ntkhang03/fb-chat-api/blob/master/DOCS.md#apisetoptionsoptions " + } } \ No newline at end of file From 2bcf752b8c27d403a6ba2734ce66614f521aa1dc Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:26:32 +0800 Subject: [PATCH 008/121] --- config.dev.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 config.dev.txt diff --git a/config.dev.txt b/config.dev.txt new file mode 100644 index 0000000000..945c9b46d6 --- /dev/null +++ b/config.dev.txt @@ -0,0 +1 @@ +. \ No newline at end of file From 82755af46f7d3ff5b7576ec8f9cb60f1d3ba2991 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:27:02 +0800 Subject: [PATCH 009/121] Update --- configCommands.dev.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 configCommands.dev.txt diff --git a/configCommands.dev.txt b/configCommands.dev.txt new file mode 100644 index 0000000000..945c9b46d6 --- /dev/null +++ b/configCommands.dev.txt @@ -0,0 +1 @@ +. \ No newline at end of file From bb385d7e7f42ea8da64c53380d6ebd0e7e49616f Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:27:26 +0800 Subject: [PATCH 010/121] Update --- account.dev.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 account.dev.txt diff --git a/account.dev.txt b/account.dev.txt new file mode 100644 index 0000000000..945c9b46d6 --- /dev/null +++ b/account.dev.txt @@ -0,0 +1 @@ +. \ No newline at end of file From 2fba8b8daf773d1881793dba147edbfc23a1892c Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:29:19 +0800 Subject: [PATCH 011/121] Update configCommands.dev.txt --- configCommands.dev.txt | 47 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/configCommands.dev.txt b/configCommands.dev.txt index 945c9b46d6..3e11352b7e 100644 --- a/configCommands.dev.txt +++ b/configCommands.dev.txt @@ -1 +1,46 @@ -. \ No newline at end of file +{ + "commandBanned": {}, + "envGlobal": { + "weatherApiKey": "d7e795ae6a0d44aaa8abb1a0a7ac19e4", + "goatbotApikey": "" + }, + "envCommands": { + "daily": { + "rewardFirstDay": { + "coin": 100, + "exp": 10 + } + }, + "notification": { + "delayPerGroup": 250 + }, + "rank": { + "deltaNext": 5 + }, + "rankup": { + "deltaNext": 5 + }, + "appstore": { + "limitResult": 3 + }, + "qr": {}, + "quiz": { + "reward": 0 + }, + "spellingbee": { + "reward": 30 + } + }, + "envEvents": { + "logsbot": { + "allow": true + } + }, + "commandUnload": [ + "prodia.js", + "ai2.js", + "quiz.js", + "spamkick.js", + "dalle3.js" + ] +} \ No newline at end of file From e898c85192125080785e3de5d8a08c14f66ed823 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:29:33 +0800 Subject: [PATCH 012/121] Update configCommands.json --- configCommands.json | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/configCommands.json b/configCommands.json index a237fd95df..945c9b46d6 100644 --- a/configCommands.json +++ b/configCommands.json @@ -1,32 +1 @@ -{ - "commandBanned": {}, - "envGlobal": { - "weatherApiKey": "d7e795ae6a0d44aaa8abb1a0a7ac19e4", - "goatbotApikey": "" - }, - "envCommands": { - "daily": { - "rewardDay1": { - "coin": 100, - "exp": 10 - } - }, - "notification": { - "delayPerGroup": 250 - }, - "rank": { - "deltaNext": 5 - }, - "rankup": { - "deltaNext": 5 - }, - "appstore": { - "limitResult": 3 - } - }, - "envEvents": { - "logsbot": { - "allow": true - } - } -} \ No newline at end of file +. \ No newline at end of file From 8c93294aa1da076d92509899e2be0b4f1f05bdfe Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:31:00 +0800 Subject: [PATCH 013/121] Update config.dev.txt --- config.dev.txt | 142 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 141 insertions(+), 1 deletion(-) diff --git a/config.dev.txt b/config.dev.txt index 945c9b46d6..2f14377e95 100644 --- a/config.dev.txt +++ b/config.dev.txt @@ -1 +1,141 @@ -. \ No newline at end of file +{ + "facebookAccount": { + "email": "", + "password": "", + "2FASecret": "", + "i_user": "", + "proxy": null, + "userAgent": "Mozilla/5.0 (Linux; Android 12; M2102J20SG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Mobile Safari/537.36", + "intervalGetNewCookie": 1440, + "notes": "time the system automatically retrieves new cookies from email/password, unit is minute, if you set null, the system will not automatically retrieve new cookies, it saves you from having to manually change your cookie every time it expires. recommended set to 1440 (1day) or 4320 (3day).TO BE ABLE TO USE THIS FEATURE YOU NEED TO ENTER THE ACCOUNT PASSWORD ABOVE" + }, + "antiInbox": false, + "language": "en", + "notesLanguage": "change to your language with ISO 639-1 code, available languages: vi (Vietnamese), en (English)", + "adminOnly": { + "enable": false, + "ignoreCommand": [] + }, + "adminBot": [ + "100025154265080" + ], + "whiteListMode": { + "enable": false, + "whiteListIds": [], + "notes": "if you enable this feature, only the ids in the whiteListIds section can use the bot" + }, + "nickNameBot": "ANSELEX1LED|๐Ÿค–", + "prefix": "-", + "database": { + "type": "sqlite", + "uriMongodb": "", + "autoSyncWhenStart": false, + "autoRefreshThreadInfoFirstTime": true, + "notes": "(1) type selects 'json' or 'sqlite' or 'mongodb'. If you choose mongodb, enter uri connect mongodb in the uriMongodb section, instructions to get uri connect mongodb at: https://youtu.be/z1f9urHW5xY. I recommend using 'mongodb' or 'sqlite', json is not recommended because it is not stable. (2) when you set autoSyncWhenStart to true, the bot will automatically synchronize the data in the database when starting the bot, this will make the bot start slower. (3) when you set autoRefreshThreadInfoFirstTime to true, the bot will automatically refresh the thread information when get first message from the thread since starting the bot" + }, + "timeZone": "Asia/Ho_Chi_Minh", + "credentials": { + "gmailAccount": { + "email": "kramn1205@gmail.com", + "clientId": "407168939339-ni7uvp8054bpnht4280n6d3no4qrf3mv.apps.googleusercontent.com", + "clientSecret": "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", + "refreshToken": "1//041Aj0DBzlyxuCgYIARAAGAQSNwF-L9IrSJFfXahDmIC5CaNNthQwg0yT8ZrFaUUofZBR13qsh-nNBLi7_4LZMlZ00F8AiWo6Moo", + "apiKey": "" + }, + "gRecaptcha": { + "siteKey": "6LdtgYMoAAAAABS1V6_RlEsUXf7dNLIzbc4EPhbt", + "secretKey": "6LdtgYMoAAAAAKXtH5f06qZBq28VXXqOb6rOSGQ5" + } + }, + "dashBoard": { + "enable": true, + "expireVerifyCode": 300000, + "port": 3001 + }, + "serverUptime": { + "enable": false, + "port": 3001, + "socket": { + "enable": true, + "channelName": "uptime", + "verifyToken": "" + } + }, + "autoRestart": { + "time": false, + "notes": "you can set time is interval with milisecond or cron time, example: 1000, 10000, 60000, 3600000, 86400000, 0 0 * * *,... docs: https://www.npmjs.com/package/node-cron. If you set time is 0 or false or null, the bot will not auto restart" + }, + "autoUptime": { + "enable": false, + "timeInterval": 180, + "url": "", + "notes": "the value of timeInterval is seconds, url is the url you want to send the request to (automatically detected for hosting glitch or replit)" + }, + "autoLoadScripts": { + "enable": false, + "ignoreCmds": "", + "ignoreEvents": "", + "notes": "this feature will automatically load the script when scripts have been changed, you can set ignoreCmds to ignore commands, ignoreEvents to ignore events, separate by comma or space, example: \"cmd1.js cmd2.js cmd3.js\" (without backslash)" + }, + "autoRefreshFbstate": true, + "autoReloginWhenChangeAccount": false, + "autoRestartWhenListenMqttError": false, + "restartListenMqtt": { + "enable": true, + "timeRestart": 3600000, + "delayAfterStopListening": 2000, + "logNoti": true, + "notes": "the value of timeRestart and delayAfterStopListening is milisecond, You shouldn't edit this if you don't know what it is" + }, + "notiWhenListenMqttError": { + "notes": "This is the message when the bot is listening to the mqtt server and the mqtt server stops working due to account problems such as: locked acc, blocked due to spam,... bot will automatically send notifications to parts of your settings. You must change enable to true to use this feature. See bot/login/handlerWhenListenHasError.js file for details on how it works", + "gmail": { + "enable": false, + "emailGetNoti": "", + "note": "Bot will use gmailAccount to send email to emailGetNoti, can send notifications to many email, separate by comma or space, example: \"example1@gmail.com example2@gmail.com\" (without backslash)" + }, + "telegram": { + "enable": false, + "botToken": "", + "chatId": "", + "note": "Can send notifications to many chatId, separate by comma or space, example: \"123456789 987654321\" (without backslash)" + }, + "discordHook": { + "enable": false, + "webhookUrl": "", + "note": "Can send notifications to many webhookUrl, separate by comma or space, example: \"https://discord.com/api/webhooks/123456789/123456789 https://discord.com/api/webhooks/987654321/987654321\" (without backslash)" + } + }, + "hideNotiMessage": { + "commandNotFound": false, + "adminOnly": false, + "threadBanned": false, + "userBanned": false, + "needRoleToUseCmd": false, + "needRoleToUseCmdOnReply": false, + "needRoleToUseCmdOnReaction": false + }, + "logEvents": { + "disableAll": false, + "message": true, + "message_reaction": true, + "message_unsend": true, + "message_reply": true, + "event": true, + "read_receipt": false, + "typ": false, + "presence": false + }, + "optionsFca": { + "forceLogin": true, + "listenEvents": true, + "updatePresence": true, + "listenTyping": true, + "logLevel": "error", + "selfListen": false, + "selfListenEvent": true, + "autoMarkDelivery": false, + "autoReconnect": false, + "notes": "Document here: https://github.com/ntkhang03/fb-chat-api/blob/master/DOCS.md#apisetoptionsoptions " + } +} \ No newline at end of file From 3c731289375e1c98de5e336b5114caa4e4d27c10 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:31:28 +0800 Subject: [PATCH 014/121] Update config.json --- config.json | 142 +--------------------------------------------------- 1 file changed, 1 insertion(+), 141 deletions(-) diff --git a/config.json b/config.json index 2f14377e95..945c9b46d6 100644 --- a/config.json +++ b/config.json @@ -1,141 +1 @@ -{ - "facebookAccount": { - "email": "", - "password": "", - "2FASecret": "", - "i_user": "", - "proxy": null, - "userAgent": "Mozilla/5.0 (Linux; Android 12; M2102J20SG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Mobile Safari/537.36", - "intervalGetNewCookie": 1440, - "notes": "time the system automatically retrieves new cookies from email/password, unit is minute, if you set null, the system will not automatically retrieve new cookies, it saves you from having to manually change your cookie every time it expires. recommended set to 1440 (1day) or 4320 (3day).TO BE ABLE TO USE THIS FEATURE YOU NEED TO ENTER THE ACCOUNT PASSWORD ABOVE" - }, - "antiInbox": false, - "language": "en", - "notesLanguage": "change to your language with ISO 639-1 code, available languages: vi (Vietnamese), en (English)", - "adminOnly": { - "enable": false, - "ignoreCommand": [] - }, - "adminBot": [ - "100025154265080" - ], - "whiteListMode": { - "enable": false, - "whiteListIds": [], - "notes": "if you enable this feature, only the ids in the whiteListIds section can use the bot" - }, - "nickNameBot": "ANSELEX1LED|๐Ÿค–", - "prefix": "-", - "database": { - "type": "sqlite", - "uriMongodb": "", - "autoSyncWhenStart": false, - "autoRefreshThreadInfoFirstTime": true, - "notes": "(1) type selects 'json' or 'sqlite' or 'mongodb'. If you choose mongodb, enter uri connect mongodb in the uriMongodb section, instructions to get uri connect mongodb at: https://youtu.be/z1f9urHW5xY. I recommend using 'mongodb' or 'sqlite', json is not recommended because it is not stable. (2) when you set autoSyncWhenStart to true, the bot will automatically synchronize the data in the database when starting the bot, this will make the bot start slower. (3) when you set autoRefreshThreadInfoFirstTime to true, the bot will automatically refresh the thread information when get first message from the thread since starting the bot" - }, - "timeZone": "Asia/Ho_Chi_Minh", - "credentials": { - "gmailAccount": { - "email": "kramn1205@gmail.com", - "clientId": "407168939339-ni7uvp8054bpnht4280n6d3no4qrf3mv.apps.googleusercontent.com", - "clientSecret": "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", - "refreshToken": "1//041Aj0DBzlyxuCgYIARAAGAQSNwF-L9IrSJFfXahDmIC5CaNNthQwg0yT8ZrFaUUofZBR13qsh-nNBLi7_4LZMlZ00F8AiWo6Moo", - "apiKey": "" - }, - "gRecaptcha": { - "siteKey": "6LdtgYMoAAAAABS1V6_RlEsUXf7dNLIzbc4EPhbt", - "secretKey": "6LdtgYMoAAAAAKXtH5f06qZBq28VXXqOb6rOSGQ5" - } - }, - "dashBoard": { - "enable": true, - "expireVerifyCode": 300000, - "port": 3001 - }, - "serverUptime": { - "enable": false, - "port": 3001, - "socket": { - "enable": true, - "channelName": "uptime", - "verifyToken": "" - } - }, - "autoRestart": { - "time": false, - "notes": "you can set time is interval with milisecond or cron time, example: 1000, 10000, 60000, 3600000, 86400000, 0 0 * * *,... docs: https://www.npmjs.com/package/node-cron. If you set time is 0 or false or null, the bot will not auto restart" - }, - "autoUptime": { - "enable": false, - "timeInterval": 180, - "url": "", - "notes": "the value of timeInterval is seconds, url is the url you want to send the request to (automatically detected for hosting glitch or replit)" - }, - "autoLoadScripts": { - "enable": false, - "ignoreCmds": "", - "ignoreEvents": "", - "notes": "this feature will automatically load the script when scripts have been changed, you can set ignoreCmds to ignore commands, ignoreEvents to ignore events, separate by comma or space, example: \"cmd1.js cmd2.js cmd3.js\" (without backslash)" - }, - "autoRefreshFbstate": true, - "autoReloginWhenChangeAccount": false, - "autoRestartWhenListenMqttError": false, - "restartListenMqtt": { - "enable": true, - "timeRestart": 3600000, - "delayAfterStopListening": 2000, - "logNoti": true, - "notes": "the value of timeRestart and delayAfterStopListening is milisecond, You shouldn't edit this if you don't know what it is" - }, - "notiWhenListenMqttError": { - "notes": "This is the message when the bot is listening to the mqtt server and the mqtt server stops working due to account problems such as: locked acc, blocked due to spam,... bot will automatically send notifications to parts of your settings. You must change enable to true to use this feature. See bot/login/handlerWhenListenHasError.js file for details on how it works", - "gmail": { - "enable": false, - "emailGetNoti": "", - "note": "Bot will use gmailAccount to send email to emailGetNoti, can send notifications to many email, separate by comma or space, example: \"example1@gmail.com example2@gmail.com\" (without backslash)" - }, - "telegram": { - "enable": false, - "botToken": "", - "chatId": "", - "note": "Can send notifications to many chatId, separate by comma or space, example: \"123456789 987654321\" (without backslash)" - }, - "discordHook": { - "enable": false, - "webhookUrl": "", - "note": "Can send notifications to many webhookUrl, separate by comma or space, example: \"https://discord.com/api/webhooks/123456789/123456789 https://discord.com/api/webhooks/987654321/987654321\" (without backslash)" - } - }, - "hideNotiMessage": { - "commandNotFound": false, - "adminOnly": false, - "threadBanned": false, - "userBanned": false, - "needRoleToUseCmd": false, - "needRoleToUseCmdOnReply": false, - "needRoleToUseCmdOnReaction": false - }, - "logEvents": { - "disableAll": false, - "message": true, - "message_reaction": true, - "message_unsend": true, - "message_reply": true, - "event": true, - "read_receipt": false, - "typ": false, - "presence": false - }, - "optionsFca": { - "forceLogin": true, - "listenEvents": true, - "updatePresence": true, - "listenTyping": true, - "logLevel": "error", - "selfListen": false, - "selfListenEvent": true, - "autoMarkDelivery": false, - "autoReconnect": false, - "notes": "Document here: https://github.com/ntkhang03/fb-chat-api/blob/master/DOCS.md#apisetoptionsoptions " - } -} \ No newline at end of file +. \ No newline at end of file From 316a83f5b7056d001f0886b256581f577d2f6248 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:34:36 +0800 Subject: [PATCH 015/121] Update account.dev.txt --- account.dev.txt | 198 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 197 insertions(+), 1 deletion(-) diff --git a/account.dev.txt b/account.dev.txt index 945c9b46d6..d2fdcf8770 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -1 +1,197 @@ -. \ No newline at end of file +[ + { + "domain": ".facebook.com", + "expirationDate": 1745246137.542271, + "hostOnly": false, + "httpOnly": true, + "name": "ps_l", + "path": "/", + "sameSite": "lax", + "secure": true, + "session": false, + "storeId": null, + "value": "0" + }, + { + "domain": ".facebook.com", + "expirationDate": 1745465528.672913, + "hostOnly": false, + "httpOnly": true, + "name": "datr", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "sP_2ZT2_s_noXLoXQQwkBlUM" + }, + { + "domain": ".facebook.com", + "expirationDate": 1718623101.647141, + "hostOnly": false, + "httpOnly": true, + "name": "fr", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "047SxwYDMPy1hPoMU.AWUIUCVDeo2EZ161o2gGmY_0oI4.Bl9v-w..AAA.0.0.Bl-XR7.AWVSSjA9rEI" + }, + { + "domain": ".facebook.com", + "expirationDate": 1716089529, + "hostOnly": false, + "httpOnly": false, + "name": "vpd", + "path": "/", + "sameSite": "lax", + "secure": true, + "session": false, + "storeId": null, + "value": "v1%3B800x424x1.445365309715271" + }, + { + "domain": ".facebook.com", + "expirationDate": 1742383113.126034, + "hostOnly": false, + "httpOnly": false, + "name": "i_user", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "61556437971771" + }, + { + "domain": ".facebook.com", + "expirationDate": 1742383101.647896, + "hostOnly": false, + "httpOnly": true, + "name": "xs", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "38%3A-H4RMh9yOngLTg%3A2%3A1710847099%3A-1%3A7867" + }, + { + "domain": ".facebook.com", + "expirationDate": 1711116452.022104, + "hostOnly": false, + "httpOnly": true, + "name": "zsh", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "ASQdA2hPq_cmT7bhplHKMo4Zka5tgwe9b6Ojlyi4F_eXjb5DbyXL7Kqxisl1qIxVf6kE_P8lh4LHSc8BBqkjdBnMPqv-c-LenhoZKIRwjcT_fbU_LsDxVPQBRhxCJB1nNcfO8Sq5i05uBuCOuOA6lzq5CXev-KheBH4BwUn4Wv6kuuXSsCNTNc51HqvqnLLG4DnFxJ8fBa08OBbNnswYDetG-1xd4Ug2qOkm_qQWoD0wphGFMvJV9fwUfovSe3Bd20VM73UEyHizsfA1Gb374qTKFjNHQebRr1LUCsBxS1nKQHZ0Rd06DPGdncYD02_dYIzyGESJQHW_3VXYovtLiJIdxDt1c3vMyA" + }, + { + "domain": ".facebook.com", + "expirationDate": 1711451913.48106, + "hostOnly": false, + "httpOnly": false, + "name": "locale", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "en_US" + }, + { + "domain": ".facebook.com", + "expirationDate": 1742383101.647698, + "hostOnly": false, + "httpOnly": false, + "name": "c_user", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "100045608791154" + }, + { + "domain": ".facebook.com", + "expirationDate": 1711449792, + "hostOnly": false, + "httpOnly": false, + "name": "dpr", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "1.445365309715271" + }, + { + "domain": ".facebook.com", + "expirationDate": 1718623121.849936, + "hostOnly": false, + "httpOnly": true, + "name": "m_page_voice", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "61556437971771" + }, + { + "domain": ".facebook.com", + "expirationDate": 1745246137.542439, + "hostOnly": false, + "httpOnly": true, + "name": "ps_n", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "0" + }, + { + "domain": ".facebook.com", + "expirationDate": 1745407101.647463, + "hostOnly": false, + "httpOnly": true, + "name": "sb", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "sP_2ZQ0y9zy3oZDzs-STDHy1" + }, + { + "domain": ".facebook.com", + "expirationDate": 1711451695, + "hostOnly": false, + "httpOnly": false, + "name": "wd", + "path": "/", + "sameSite": "lax", + "secure": true, + "session": false, + "storeId": null, + "value": "499x941" + }, + { + "domain": ".facebook.com", + "expirationDate": 1718600186, + "hostOnly": false, + "httpOnly": false, + "name": "wl_cbv", + "path": "/", + "sameSite": "no_restriction", + "secure": true, + "session": false, + "storeId": null, + "value": "v2%3Bclient_version%3A2440%3Btimestamp%3A1710824185" + } +] \ No newline at end of file From 4f15be04d03904d0f2deac0ce16e7208230eea52 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:40:34 +0800 Subject: [PATCH 016/121] Update config.dev.txt --- config.dev.txt | 142 +------------------------------------------------ 1 file changed, 1 insertion(+), 141 deletions(-) diff --git a/config.dev.txt b/config.dev.txt index 2f14377e95..945c9b46d6 100644 --- a/config.dev.txt +++ b/config.dev.txt @@ -1,141 +1 @@ -{ - "facebookAccount": { - "email": "", - "password": "", - "2FASecret": "", - "i_user": "", - "proxy": null, - "userAgent": "Mozilla/5.0 (Linux; Android 12; M2102J20SG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Mobile Safari/537.36", - "intervalGetNewCookie": 1440, - "notes": "time the system automatically retrieves new cookies from email/password, unit is minute, if you set null, the system will not automatically retrieve new cookies, it saves you from having to manually change your cookie every time it expires. recommended set to 1440 (1day) or 4320 (3day).TO BE ABLE TO USE THIS FEATURE YOU NEED TO ENTER THE ACCOUNT PASSWORD ABOVE" - }, - "antiInbox": false, - "language": "en", - "notesLanguage": "change to your language with ISO 639-1 code, available languages: vi (Vietnamese), en (English)", - "adminOnly": { - "enable": false, - "ignoreCommand": [] - }, - "adminBot": [ - "100025154265080" - ], - "whiteListMode": { - "enable": false, - "whiteListIds": [], - "notes": "if you enable this feature, only the ids in the whiteListIds section can use the bot" - }, - "nickNameBot": "ANSELEX1LED|๐Ÿค–", - "prefix": "-", - "database": { - "type": "sqlite", - "uriMongodb": "", - "autoSyncWhenStart": false, - "autoRefreshThreadInfoFirstTime": true, - "notes": "(1) type selects 'json' or 'sqlite' or 'mongodb'. If you choose mongodb, enter uri connect mongodb in the uriMongodb section, instructions to get uri connect mongodb at: https://youtu.be/z1f9urHW5xY. I recommend using 'mongodb' or 'sqlite', json is not recommended because it is not stable. (2) when you set autoSyncWhenStart to true, the bot will automatically synchronize the data in the database when starting the bot, this will make the bot start slower. (3) when you set autoRefreshThreadInfoFirstTime to true, the bot will automatically refresh the thread information when get first message from the thread since starting the bot" - }, - "timeZone": "Asia/Ho_Chi_Minh", - "credentials": { - "gmailAccount": { - "email": "kramn1205@gmail.com", - "clientId": "407168939339-ni7uvp8054bpnht4280n6d3no4qrf3mv.apps.googleusercontent.com", - "clientSecret": "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", - "refreshToken": "1//041Aj0DBzlyxuCgYIARAAGAQSNwF-L9IrSJFfXahDmIC5CaNNthQwg0yT8ZrFaUUofZBR13qsh-nNBLi7_4LZMlZ00F8AiWo6Moo", - "apiKey": "" - }, - "gRecaptcha": { - "siteKey": "6LdtgYMoAAAAABS1V6_RlEsUXf7dNLIzbc4EPhbt", - "secretKey": "6LdtgYMoAAAAAKXtH5f06qZBq28VXXqOb6rOSGQ5" - } - }, - "dashBoard": { - "enable": true, - "expireVerifyCode": 300000, - "port": 3001 - }, - "serverUptime": { - "enable": false, - "port": 3001, - "socket": { - "enable": true, - "channelName": "uptime", - "verifyToken": "" - } - }, - "autoRestart": { - "time": false, - "notes": "you can set time is interval with milisecond or cron time, example: 1000, 10000, 60000, 3600000, 86400000, 0 0 * * *,... docs: https://www.npmjs.com/package/node-cron. If you set time is 0 or false or null, the bot will not auto restart" - }, - "autoUptime": { - "enable": false, - "timeInterval": 180, - "url": "", - "notes": "the value of timeInterval is seconds, url is the url you want to send the request to (automatically detected for hosting glitch or replit)" - }, - "autoLoadScripts": { - "enable": false, - "ignoreCmds": "", - "ignoreEvents": "", - "notes": "this feature will automatically load the script when scripts have been changed, you can set ignoreCmds to ignore commands, ignoreEvents to ignore events, separate by comma or space, example: \"cmd1.js cmd2.js cmd3.js\" (without backslash)" - }, - "autoRefreshFbstate": true, - "autoReloginWhenChangeAccount": false, - "autoRestartWhenListenMqttError": false, - "restartListenMqtt": { - "enable": true, - "timeRestart": 3600000, - "delayAfterStopListening": 2000, - "logNoti": true, - "notes": "the value of timeRestart and delayAfterStopListening is milisecond, You shouldn't edit this if you don't know what it is" - }, - "notiWhenListenMqttError": { - "notes": "This is the message when the bot is listening to the mqtt server and the mqtt server stops working due to account problems such as: locked acc, blocked due to spam,... bot will automatically send notifications to parts of your settings. You must change enable to true to use this feature. See bot/login/handlerWhenListenHasError.js file for details on how it works", - "gmail": { - "enable": false, - "emailGetNoti": "", - "note": "Bot will use gmailAccount to send email to emailGetNoti, can send notifications to many email, separate by comma or space, example: \"example1@gmail.com example2@gmail.com\" (without backslash)" - }, - "telegram": { - "enable": false, - "botToken": "", - "chatId": "", - "note": "Can send notifications to many chatId, separate by comma or space, example: \"123456789 987654321\" (without backslash)" - }, - "discordHook": { - "enable": false, - "webhookUrl": "", - "note": "Can send notifications to many webhookUrl, separate by comma or space, example: \"https://discord.com/api/webhooks/123456789/123456789 https://discord.com/api/webhooks/987654321/987654321\" (without backslash)" - } - }, - "hideNotiMessage": { - "commandNotFound": false, - "adminOnly": false, - "threadBanned": false, - "userBanned": false, - "needRoleToUseCmd": false, - "needRoleToUseCmdOnReply": false, - "needRoleToUseCmdOnReaction": false - }, - "logEvents": { - "disableAll": false, - "message": true, - "message_reaction": true, - "message_unsend": true, - "message_reply": true, - "event": true, - "read_receipt": false, - "typ": false, - "presence": false - }, - "optionsFca": { - "forceLogin": true, - "listenEvents": true, - "updatePresence": true, - "listenTyping": true, - "logLevel": "error", - "selfListen": false, - "selfListenEvent": true, - "autoMarkDelivery": false, - "autoReconnect": false, - "notes": "Document here: https://github.com/ntkhang03/fb-chat-api/blob/master/DOCS.md#apisetoptionsoptions " - } -} \ No newline at end of file +. \ No newline at end of file From 2fa8f97a8fafb5d3a225c0b4bb5de3a452d4a83a Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:41:03 +0800 Subject: [PATCH 017/121] Update --- config.dev.json | 141 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 config.dev.json diff --git a/config.dev.json b/config.dev.json new file mode 100644 index 0000000000..2f14377e95 --- /dev/null +++ b/config.dev.json @@ -0,0 +1,141 @@ +{ + "facebookAccount": { + "email": "", + "password": "", + "2FASecret": "", + "i_user": "", + "proxy": null, + "userAgent": "Mozilla/5.0 (Linux; Android 12; M2102J20SG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Mobile Safari/537.36", + "intervalGetNewCookie": 1440, + "notes": "time the system automatically retrieves new cookies from email/password, unit is minute, if you set null, the system will not automatically retrieve new cookies, it saves you from having to manually change your cookie every time it expires. recommended set to 1440 (1day) or 4320 (3day).TO BE ABLE TO USE THIS FEATURE YOU NEED TO ENTER THE ACCOUNT PASSWORD ABOVE" + }, + "antiInbox": false, + "language": "en", + "notesLanguage": "change to your language with ISO 639-1 code, available languages: vi (Vietnamese), en (English)", + "adminOnly": { + "enable": false, + "ignoreCommand": [] + }, + "adminBot": [ + "100025154265080" + ], + "whiteListMode": { + "enable": false, + "whiteListIds": [], + "notes": "if you enable this feature, only the ids in the whiteListIds section can use the bot" + }, + "nickNameBot": "ANSELEX1LED|๐Ÿค–", + "prefix": "-", + "database": { + "type": "sqlite", + "uriMongodb": "", + "autoSyncWhenStart": false, + "autoRefreshThreadInfoFirstTime": true, + "notes": "(1) type selects 'json' or 'sqlite' or 'mongodb'. If you choose mongodb, enter uri connect mongodb in the uriMongodb section, instructions to get uri connect mongodb at: https://youtu.be/z1f9urHW5xY. I recommend using 'mongodb' or 'sqlite', json is not recommended because it is not stable. (2) when you set autoSyncWhenStart to true, the bot will automatically synchronize the data in the database when starting the bot, this will make the bot start slower. (3) when you set autoRefreshThreadInfoFirstTime to true, the bot will automatically refresh the thread information when get first message from the thread since starting the bot" + }, + "timeZone": "Asia/Ho_Chi_Minh", + "credentials": { + "gmailAccount": { + "email": "kramn1205@gmail.com", + "clientId": "407168939339-ni7uvp8054bpnht4280n6d3no4qrf3mv.apps.googleusercontent.com", + "clientSecret": "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", + "refreshToken": "1//041Aj0DBzlyxuCgYIARAAGAQSNwF-L9IrSJFfXahDmIC5CaNNthQwg0yT8ZrFaUUofZBR13qsh-nNBLi7_4LZMlZ00F8AiWo6Moo", + "apiKey": "" + }, + "gRecaptcha": { + "siteKey": "6LdtgYMoAAAAABS1V6_RlEsUXf7dNLIzbc4EPhbt", + "secretKey": "6LdtgYMoAAAAAKXtH5f06qZBq28VXXqOb6rOSGQ5" + } + }, + "dashBoard": { + "enable": true, + "expireVerifyCode": 300000, + "port": 3001 + }, + "serverUptime": { + "enable": false, + "port": 3001, + "socket": { + "enable": true, + "channelName": "uptime", + "verifyToken": "" + } + }, + "autoRestart": { + "time": false, + "notes": "you can set time is interval with milisecond or cron time, example: 1000, 10000, 60000, 3600000, 86400000, 0 0 * * *,... docs: https://www.npmjs.com/package/node-cron. If you set time is 0 or false or null, the bot will not auto restart" + }, + "autoUptime": { + "enable": false, + "timeInterval": 180, + "url": "", + "notes": "the value of timeInterval is seconds, url is the url you want to send the request to (automatically detected for hosting glitch or replit)" + }, + "autoLoadScripts": { + "enable": false, + "ignoreCmds": "", + "ignoreEvents": "", + "notes": "this feature will automatically load the script when scripts have been changed, you can set ignoreCmds to ignore commands, ignoreEvents to ignore events, separate by comma or space, example: \"cmd1.js cmd2.js cmd3.js\" (without backslash)" + }, + "autoRefreshFbstate": true, + "autoReloginWhenChangeAccount": false, + "autoRestartWhenListenMqttError": false, + "restartListenMqtt": { + "enable": true, + "timeRestart": 3600000, + "delayAfterStopListening": 2000, + "logNoti": true, + "notes": "the value of timeRestart and delayAfterStopListening is milisecond, You shouldn't edit this if you don't know what it is" + }, + "notiWhenListenMqttError": { + "notes": "This is the message when the bot is listening to the mqtt server and the mqtt server stops working due to account problems such as: locked acc, blocked due to spam,... bot will automatically send notifications to parts of your settings. You must change enable to true to use this feature. See bot/login/handlerWhenListenHasError.js file for details on how it works", + "gmail": { + "enable": false, + "emailGetNoti": "", + "note": "Bot will use gmailAccount to send email to emailGetNoti, can send notifications to many email, separate by comma or space, example: \"example1@gmail.com example2@gmail.com\" (without backslash)" + }, + "telegram": { + "enable": false, + "botToken": "", + "chatId": "", + "note": "Can send notifications to many chatId, separate by comma or space, example: \"123456789 987654321\" (without backslash)" + }, + "discordHook": { + "enable": false, + "webhookUrl": "", + "note": "Can send notifications to many webhookUrl, separate by comma or space, example: \"https://discord.com/api/webhooks/123456789/123456789 https://discord.com/api/webhooks/987654321/987654321\" (without backslash)" + } + }, + "hideNotiMessage": { + "commandNotFound": false, + "adminOnly": false, + "threadBanned": false, + "userBanned": false, + "needRoleToUseCmd": false, + "needRoleToUseCmdOnReply": false, + "needRoleToUseCmdOnReaction": false + }, + "logEvents": { + "disableAll": false, + "message": true, + "message_reaction": true, + "message_unsend": true, + "message_reply": true, + "event": true, + "read_receipt": false, + "typ": false, + "presence": false + }, + "optionsFca": { + "forceLogin": true, + "listenEvents": true, + "updatePresence": true, + "listenTyping": true, + "logLevel": "error", + "selfListen": false, + "selfListenEvent": true, + "autoMarkDelivery": false, + "autoReconnect": false, + "notes": "Document here: https://github.com/ntkhang03/fb-chat-api/blob/master/DOCS.md#apisetoptionsoptions " + } +} \ No newline at end of file From b25d1df714332c58f5abe8fcdd83267015e3c263 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:46:10 +0800 Subject: [PATCH 018/121] Update configCommands.dev.txt --- configCommands.dev.txt | 48 ++---------------------------------------- 1 file changed, 2 insertions(+), 46 deletions(-) diff --git a/configCommands.dev.txt b/configCommands.dev.txt index 3e11352b7e..97ecda9224 100644 --- a/configCommands.dev.txt +++ b/configCommands.dev.txt @@ -1,46 +1,2 @@ -{ - "commandBanned": {}, - "envGlobal": { - "weatherApiKey": "d7e795ae6a0d44aaa8abb1a0a7ac19e4", - "goatbotApikey": "" - }, - "envCommands": { - "daily": { - "rewardFirstDay": { - "coin": 100, - "exp": 10 - } - }, - "notification": { - "delayPerGroup": 250 - }, - "rank": { - "deltaNext": 5 - }, - "rankup": { - "deltaNext": 5 - }, - "appstore": { - "limitResult": 3 - }, - "qr": {}, - "quiz": { - "reward": 0 - }, - "spellingbee": { - "reward": 30 - } - }, - "envEvents": { - "logsbot": { - "allow": true - } - }, - "commandUnload": [ - "prodia.js", - "ai2.js", - "quiz.js", - "spamkick.js", - "dalle3.js" - ] -} \ No newline at end of file + +blank \ No newline at end of file From de9d9d6316c1ab27786396a8905070c2ac314752 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:46:38 +0800 Subject: [PATCH 019/121] Update --- configCommand.dev.json | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 configCommand.dev.json diff --git a/configCommand.dev.json b/configCommand.dev.json new file mode 100644 index 0000000000..3e11352b7e --- /dev/null +++ b/configCommand.dev.json @@ -0,0 +1,46 @@ +{ + "commandBanned": {}, + "envGlobal": { + "weatherApiKey": "d7e795ae6a0d44aaa8abb1a0a7ac19e4", + "goatbotApikey": "" + }, + "envCommands": { + "daily": { + "rewardFirstDay": { + "coin": 100, + "exp": 10 + } + }, + "notification": { + "delayPerGroup": 250 + }, + "rank": { + "deltaNext": 5 + }, + "rankup": { + "deltaNext": 5 + }, + "appstore": { + "limitResult": 3 + }, + "qr": {}, + "quiz": { + "reward": 0 + }, + "spellingbee": { + "reward": 30 + } + }, + "envEvents": { + "logsbot": { + "allow": true + } + }, + "commandUnload": [ + "prodia.js", + "ai2.js", + "quiz.js", + "spamkick.js", + "dalle3.js" + ] +} \ No newline at end of file From 29fd8fccfad80f7c44ff34260e7759a5453f25a9 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:52:12 +0800 Subject: [PATCH 020/121] Update configCommands.dev.txt --- configCommands.dev.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configCommands.dev.txt b/configCommands.dev.txt index 97ecda9224..945c9b46d6 100644 --- a/configCommands.dev.txt +++ b/configCommands.dev.txt @@ -1,2 +1 @@ - -blank \ No newline at end of file +. \ No newline at end of file From 7efa7d913d250e6f0b0d6144d499d6644c90b0f6 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:43:48 +0800 Subject: [PATCH 021/121] Update configCommand.dev.json --- configCommand.dev.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configCommand.dev.json b/configCommand.dev.json index 3e11352b7e..a0782612dd 100644 --- a/configCommand.dev.json +++ b/configCommand.dev.json @@ -43,4 +43,4 @@ "spamkick.js", "dalle3.js" ] -} \ No newline at end of file +} \ No newline at end of file From 322679f88ccf7e01480dd1cb116f880aa67b8f38 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:53:46 +0800 Subject: [PATCH 022/121] Update configCommands.dev.json --- configCommands.json | 47 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/configCommands.json b/configCommands.json index 945c9b46d6..a0782612dd 100644 --- a/configCommands.json +++ b/configCommands.json @@ -1 +1,46 @@ -. \ No newline at end of file +{ + "commandBanned": {}, + "envGlobal": { + "weatherApiKey": "d7e795ae6a0d44aaa8abb1a0a7ac19e4", + "goatbotApikey": "" + }, + "envCommands": { + "daily": { + "rewardFirstDay": { + "coin": 100, + "exp": 10 + } + }, + "notification": { + "delayPerGroup": 250 + }, + "rank": { + "deltaNext": 5 + }, + "rankup": { + "deltaNext": 5 + }, + "appstore": { + "limitResult": 3 + }, + "qr": {}, + "quiz": { + "reward": 0 + }, + "spellingbee": { + "reward": 30 + } + }, + "envEvents": { + "logsbot": { + "allow": true + } + }, + "commandUnload": [ + "prodia.js", + "ai2.js", + "quiz.js", + "spamkick.js", + "dalle3.js" + ] +} \ No newline at end of file From 59eb0dd6f974681dedaf64a992920fd6e96c35d0 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:55:38 +0800 Subject: [PATCH 023/121] Update configCommand.dev.json --- configCommand.dev.json | 47 +----------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/configCommand.dev.json b/configCommand.dev.json index a0782612dd..945c9b46d6 100644 --- a/configCommand.dev.json +++ b/configCommand.dev.json @@ -1,46 +1 @@ -{ - "commandBanned": {}, - "envGlobal": { - "weatherApiKey": "d7e795ae6a0d44aaa8abb1a0a7ac19e4", - "goatbotApikey": "" - }, - "envCommands": { - "daily": { - "rewardFirstDay": { - "coin": 100, - "exp": 10 - } - }, - "notification": { - "delayPerGroup": 250 - }, - "rank": { - "deltaNext": 5 - }, - "rankup": { - "deltaNext": 5 - }, - "appstore": { - "limitResult": 3 - }, - "qr": {}, - "quiz": { - "reward": 0 - }, - "spellingbee": { - "reward": 30 - } - }, - "envEvents": { - "logsbot": { - "allow": true - } - }, - "commandUnload": [ - "prodia.js", - "ai2.js", - "quiz.js", - "spamkick.js", - "dalle3.js" - ] -} \ No newline at end of file +. \ No newline at end of file From 40b17a33515939bdd9d7d4c64a6087d2d3700832 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:56:16 +0800 Subject: [PATCH 024/121] Update configCommands.json --- configCommands.json | 47 +-------------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/configCommands.json b/configCommands.json index a0782612dd..945c9b46d6 100644 --- a/configCommands.json +++ b/configCommands.json @@ -1,46 +1 @@ -{ - "commandBanned": {}, - "envGlobal": { - "weatherApiKey": "d7e795ae6a0d44aaa8abb1a0a7ac19e4", - "goatbotApikey": "" - }, - "envCommands": { - "daily": { - "rewardFirstDay": { - "coin": 100, - "exp": 10 - } - }, - "notification": { - "delayPerGroup": 250 - }, - "rank": { - "deltaNext": 5 - }, - "rankup": { - "deltaNext": 5 - }, - "appstore": { - "limitResult": 3 - }, - "qr": {}, - "quiz": { - "reward": 0 - }, - "spellingbee": { - "reward": 30 - } - }, - "envEvents": { - "logsbot": { - "allow": true - } - }, - "commandUnload": [ - "prodia.js", - "ai2.js", - "quiz.js", - "spamkick.js", - "dalle3.js" - ] -} \ No newline at end of file +. \ No newline at end of file From 0fdb78a7cf3f3590f302493f6b24de0c2dfe8fc7 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:57:08 +0800 Subject: [PATCH 025/121] Update --- configCommands.dev.json | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 configCommands.dev.json diff --git a/configCommands.dev.json b/configCommands.dev.json new file mode 100644 index 0000000000..3a1657f9f7 --- /dev/null +++ b/configCommands.dev.json @@ -0,0 +1,32 @@ +{ + "commandBanned": {}, + "envGlobal": { + "weatherApiKey": "d7e795ae6a0d44aaa8abb1a0a7ac19e4", + "goatbotApikey": "" + }, + "envCommands": { + "daily": { + "rewardDay1": { + "coin": 100, + "exp": 10 + } + }, + "notification": { + "delayPerGroup": 250 + }, + "rank": { + "deltaNext": 5 + }, + "rankup": { + "deltaNext": 5 + }, + "appstore": { + "limitResult": 3 + } + }, + "envEvents": { + "logsbot": { + "allow": true + } + } +} \ No newline at end of file From 5e15538833781714a095899f776fa033ec0f06ee Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:08:07 +0800 Subject: [PATCH 026/121] Update help.js --- scripts/cmds/help.js | 693 +++++++++++++++++++------------------------ 1 file changed, 312 insertions(+), 381 deletions(-) diff --git a/scripts/cmds/help.js b/scripts/cmds/help.js index d6cdb0512d..2028434ffd 100644 --- a/scripts/cmds/help.js +++ b/scripts/cmds/help.js @@ -3,7 +3,7 @@ const axios = require("axios"); const path = require("path"); const { getPrefix } = global.utils; const { commands, aliases } = global.GoatBot; -const doNotDelete = "["[MENTION ADMIN WHEN BOT IS DIE โžก๏ธANSELMO]";]"; +const doNotDelete = "[ ARTNINTEL๐Ÿค–๐ŸŒ ANSEL ]"; /** * @author NTKhang * @author: do not delete it @@ -11,399 +11,330 @@ const doNotDelete = "["[MENTION ADMIN WHEN BOT IS DIE โžก๏ธANSELMO]";]"; */ module.exports = { - config: { - name: "help", - version: "1.21", - author: "NTKhang", - countDown: 5, - role: 0, - description: { - vi: "Xem cรกch sแปญ dแปฅng cแปงa cรกc lแป‡nh", - en: "View command usage" - }, - category: "info", - guide: { - vi: " {pn} [ฤ‘แปƒ trแป‘ng | | ]" - + "\n {pn} [-u | usage | -g | guide]: chแป‰ hiแปƒn thแป‹ phแบงn hฦฐแป›ng dแบซn sแปญ dแปฅng lแป‡nh" - + "\n {pn} [-i | info]: chแป‰ hiแปƒn thแป‹ phแบงn thรดng tin vแป lแป‡nh" - + "\n {pn} [-r | role]: chแป‰ hiแปƒn thแป‹ phแบงn quyแปn hแบกn cแปงa lแป‡nh" - + "\n {pn} [-a | alias]: chแป‰ hiแปƒn thแป‹ phแบงn tรชn viแบฟt tแบฏt cแปงa lแป‡nh", - en: "{pn} [empty | | ]" - + "\n {pn} [-u | usage | -g | guide]: only show command usage" - + "\n {pn} [-i | info]: only show command info" - + "\n {pn} [-r | role]: only show command role" - + "\n {pn} [-a | alias]: only show command alias" - }, - priority: 1 - }, + config: { + name: "help", + version: "1.21", + author: "NTKhang", + countDown: 5, + role: 0, + description: { + vi: "Xem cรกch sแปญ dแปฅng cแปงa cรกc lแป‡nh", + en: "View command usage" + }, + category: "info", + guide: { + vi: " {pn} [ฤ‘แปƒ trแป‘ng | | ]" + + "\n {pn} [-u | usage | -g | guide]: chแป‰ hiแปƒn thแป‹ phแบงn hฦฐแป›ng dแบซn sแปญ dแปฅng lแป‡nh" + + "\n {pn} [-i | info]: chแป‰ hiแปƒn thแป‹ phแบงn thรดng tin vแป lแป‡nh" + + "\n {pn} [-r | role]: chแป‰ hiแปƒn thแป‹ phแบงn quyแปn hแบกn cแปงa lแป‡nh" + + "\n {pn} [-a | alias]: chแป‰ hiแปƒn thแป‹ phแบงn tรชn viแบฟt tแบฏt cแปงa lแป‡nh", + en: "{pn} [empty | | ]" + + "\n {pn} [-u | usage | -g | guide]: only show command usage" + + "\n {pn} [-i | info]: only show command info" + + "\n {pn} [-r | role]: only show command role" + + "\n {pn} [-a | alias]: only show command alias" + }, + priority: 1 + }, - langs: { - vi: { - help: "โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“" - + "\n%1" - + "\nโ”œโ”€โ”€โ”€โ”€โ”€โญ”" - + "\nโ”‚ Trang [ %2/%3 ]" - + "\nโ”‚ Hiแป‡n tแบกi bot cรณ %4 lแป‡nh cรณ thแปƒ sแปญ dแปฅng" - + "\nโ”‚ ยป Gรต %5help ฤ‘แปƒ xem danh sรกch cรกc lแป‡nh" - + "\nโ”‚ ยป Gรต %5help ฤ‘แปƒ xem chi tiแบฟt cรกch sแปญ dแปฅng lแป‡nh ฤ‘รณ" - + "\nโ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ”" - + "\nโ”‚ %6" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - help2: "%1โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ”" - + "\nโ”‚ ยป Hiแป‡n tแบกi bot cรณ %2 lแป‡nh cรณ thแปƒ sแปญ dแปฅng" - + "\nโ”‚ ยป Gรต %3help ฤ‘แปƒ xem chi tiแบฟt cรกch sแปญ dแปฅng lแป‡nh ฤ‘รณ" - + "\nโ”‚ %4" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - commandNotFound: "Lแป‡nh \"%1\" khรดng tแป“n tแบกi", - getInfoCommand: "โ•ญโ”€โ”€ NAME โ”€โ”€โ”€โ”€โญ“" - + "\nโ”‚ %1" - + "\nโ”œโ”€โ”€ INFO" - + "\nโ”‚ Mรด tแบฃ: %2" - + "\nโ”‚ Cรกc tรชn gแปi khรกc: %3" - + "\nโ”‚ Cรกc tรชn gแปi khรกc trong nhรณm bแบกn: %4" - + "\nโ”‚ Version: %5" - + "\nโ”‚ Role: %6" - + "\nโ”‚ Thแปi gian mแป—i lแบงn dรนng lแป‡nh: %7s" - + "\nโ”‚ Author: %8" - + "\nโ”œโ”€โ”€ USAGE" - + "\nโ”‚%9" - + "\nโ”œโ”€โ”€ NOTES" - + "\nโ”‚ Nแป™i dung bรชn trong lร  cรณ thแปƒ thay ฤ‘แป•i" - + "\nโ”‚ Nแป™i dung bรชn trong [a|b|c] lร  a hoแบทc b hoแบทc c" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โญ”", - onlyInfo: "โ•ญโ”€โ”€ INFO โ”€โ”€โ”€โ”€โญ“" - + "\nโ”‚ Tรชn lแป‡nh: %1" - + "\nโ”‚ Mรด tแบฃ: %2" - + "\nโ”‚ Cรกc tรชn gแปi khรกc: %3" - + "\nโ”‚ Cรกc tรชn gแปi khรกc trong nhรณm bแบกn: %4" - + "\nโ”‚ Version: %5" - + "\nโ”‚ Role: %6" - + "\nโ”‚ Thแปi gian mแป—i lแบงn dรนng lแป‡nh: %7s" - + "\nโ”‚ Author: %8" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - onlyUsage: "โ•ญโ”€โ”€ USAGE โ”€โ”€โ”€โ”€โญ“" - + "\nโ”‚%1" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - onlyAlias: "โ•ญโ”€โ”€ ALIAS โ”€โ”€โ”€โ”€โญ“" - + "\nโ”‚ Cรกc tรชn gแปi khรกc: %1" - + "\nโ”‚ Cรกc tรชn gแปi khรกc trong nhรณm bแบกn: %2" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - onlyRole: "โ•ญโ”€โ”€ ROLE โ”€โ”€โ”€โ”€โญ“" - + "\nโ”‚%1" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - doNotHave: "Khรดng cรณ", - roleText0: "0 (Tแบฅt cแบฃ ngฦฐแปi dรนng)", - roleText1: "1 (Quแบฃn trแป‹ viรชn nhรณm)", - roleText2: "2 (Admin bot)", - roleText0setRole: "0 (set role, tแบฅt cแบฃ ngฦฐแปi dรนng)", - roleText1setRole: "1 (set role, quแบฃn trแป‹ viรชn nhรณm)", - pageNotFound: "Trang %1 khรดng tแป“n tแบกi" - }, - en: { - help: "โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“" - + "\n%1" - + "\nโ”œโ”€โ”€โ”€โ”€โ”€โญ”" - + "\nโ”‚ Page [ %2/%3 ]" - + "\nโ”‚ Currently, the bot has %4 commands that can be used" - + "\nโ”‚ ยป Type %5help to view the command list" - + "\nโ”‚ ยป Type %5help to view the details of how to use that command" - + "\nโ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ”" - + "\nโ”‚ %6" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - help2: "%1โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ”" - + "\nโ”‚ ยป Currently, the bot has %2 commands that can be used" - + "\nโ”‚ ยป Type %3help to view the details of how to use that command" - + "\nโ”‚ %4" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - commandNotFound: "Command \"%1\" does not exist", - getInfoCommand: "โ•ญโ”€โ”€ NAME โ”€โ”€โ”€โ”€โญ“" - + "\nโ”‚ %1" - + "\nโ”œโ”€โ”€ INFO" - + "\nโ”‚ Description: %2" - + "\nโ”‚ Other names: %3" - + "\nโ”‚ Other names in your group: %4" - + "\nโ”‚ Version: %5" - + "\nโ”‚ Role: %6" - + "\nโ”‚ Time per command: %7s" - + "\nโ”‚ Author: %8" - + "\nโ”œโ”€โ”€ USAGE" - + "\nโ”‚%9" - + "\nโ”œโ”€โ”€ NOTES" - + "\nโ”‚ The content inside can be changed" - + "\nโ”‚ The content inside [a|b|c] is a or b or c" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โญ”", - onlyInfo: "โ•ญโ”€โ”€ INFO โ”€โ”€โ”€โ”€โญ“" - + "\nโ”‚ Command name: %1" - + "\nโ”‚ Description: %2" - + "\nโ”‚ Other names: %3" - + "\nโ”‚ Other names in your group: %4" - + "\nโ”‚ Version: %5" - + "\nโ”‚ Role: %6" - + "\nโ”‚ Time per command: %7s" - + "\nโ”‚ Author: %8" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - onlyUsage: "โ•ญโ”€โ”€ USAGE โ”€โ”€โ”€โ”€โญ“" - + "\nโ”‚%1" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - onlyAlias: "โ•ญโ”€โ”€ ALIAS โ”€โ”€โ”€โ”€โญ“" - + "\nโ”‚ Other names: %1" - + "\nโ”‚ Other names in your group: %2" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - onlyRole: "โ•ญโ”€โ”€ ROLE โ”€โ”€โ”€โ”€โญ“" - + "\nโ”‚%1" - + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", - doNotHave: "Do not have", - roleText0: "0 (All users)", - roleText1: "1 (Group administrators)", - roleText2: "2 (Admin bot)", - roleText0setRole: "0 (set role, all users)", - roleText1setRole: "1 (set role, group administrators)", - pageNotFound: "Page %1 does not exist" - } - }, + langs: { + vi: { + help: "โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“" + + "\n%1" + + "\nโ”œโ”€โ”€โ”€โ”€โ”€โญ”" + + "\nโ”‚ Trang [ %2/%3 ]" + + "\nโ”‚ Hiแป‡n tแบกi bot cรณ %4 lแป‡nh cรณ thแปƒ sแปญ dแปฅng" + + "\nโ”‚ ยป Gรต %5help ฤ‘แปƒ xem danh sรกch cรกc lแป‡nh" + + "\nโ”‚ ยป Gรต %5help ฤ‘แปƒ xem chi tiแบฟt cรกch sแปญ dแปฅng lแป‡nh ฤ‘รณ" + + "\nโ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ”" + + "\nโ”‚ %6" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + help2: "%1โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ”" + + "\nโ”‚ ยป Hiแป‡n tแบกi bot cรณ %2 lแป‡nh cรณ thแปƒ sแปญ dแปฅng" + + "\nโ”‚ ยป Gรต %3help ฤ‘แปƒ xem chi tiแบฟt cรกch sแปญ dแปฅng lแป‡nh ฤ‘รณ" + + "\nโ”‚ %4" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + commandNotFound: "Lแป‡nh \"%1\" khรดng tแป“n tแบกi", + getInfoCommand: "โ•ญโ”€โ”€ NAME โ”€โ”€โ”€โ”€โญ“" + + "\nโ”‚ %1" + + "\nโ”œโ”€โ”€ INFO" + + "\nโ”‚ Mรด tแบฃ: %2" + + "\nโ”‚ Cรกc tรชn gแปi khรกc: %3" + + "\nโ”‚ Cรกc tรชn gแปi khรกc trong nhรณm bแบกn: %4" + + "\nโ”‚ Version: %5" + + "\nโ”‚ Role: %6" + + "\nโ”‚ Thแปi gian mแป—i lแบงn dรนng lแป‡nh: %7s" + + "\nโ”‚ Author: %8" + + "\nโ”œโ”€โ”€ USAGE" + + "\nโ”‚%9" + + "\nโ”œโ”€โ”€ NOTES" + + "\nโ”‚ Nแป™i dung bรชn trong lร  cรณ thแปƒ thay ฤ‘แป•i" + + "\nโ”‚ Nแป™i dung bรชn trong [a|b|c] lร  a hoแบทc b hoแบทc c" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โญ”", + onlyInfo: "โ•ญโ”€โ”€ INFO โ”€โ”€โ”€โ”€โญ“" + + "\nโ”‚ Tรชn lแป‡nh: %1" + + "\nโ”‚ Mรด tแบฃ: %2" + + "\nโ”‚ Cรกc tรชn gแปi khรกc: %3" + + "\nโ”‚ Cรกc tรชn gแปi khรกc trong nhรณm bแบกn: %4" + + "\nโ”‚ Version: %5" + + "\nโ”‚ Role: %6" + + "\nโ”‚ Thแปi gian mแป—i lแบงn dรนng lแป‡nh: %7s" + + "\nโ”‚ Author: %8" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + onlyUsage: "โ•ญโ”€โ”€ USAGE โ”€โ”€โ”€โ”€โญ“" + + "\nโ”‚%1" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + onlyAlias: "โ•ญโ”€โ”€ ALIAS โ”€โ”€โ”€โ”€โญ“" + + "\nโ”‚ Cรกc tรชn gแปi khรกc: %1" + + "\nโ”‚ Cรกc tรชn gแปi khรกc trong nhรณm bแบกn: %2" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + onlyRole: "โ•ญโ”€โ”€ ROLE โ”€โ”€โ”€โ”€โญ“" + + "\nโ”‚%1" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + doNotHave: "Khรดng cรณ", + roleText0: "0 (Tแบฅt cแบฃ ngฦฐแปi dรนng)", + roleText1: "1 (Quแบฃn trแป‹ viรชn nhรณm)", + roleText2: "2 (Admin bot)", + roleText0setRole: "0 (set role, tแบฅt cแบฃ ngฦฐแปi dรนng)", + roleText1setRole: "1 (set role, quแบฃn trแป‹ viรชn nhรณm)", + pageNotFound: "Trang %1 khรดng tแป“n tแบกi" + }, + en: { + help: "โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“" + + "\n%1" + + "\nโ”œโ”€โ”€โ”€โ”€โ”€โญ”" + + "\nโ”‚ Page [ %2/%3 ]" + + "\nโ”‚ Currently, the bot has %4 commands that can be used" + + "\nโ”‚ ยป Type %5help to view the command list" + + "\nโ”‚ ยป Type %5help to view the details of how to use that command" + + "\nโ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ”" + + "\nโ”‚ %6" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + help2: "%1โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ”" + + "\nโ”‚ ยป Currently, the bot has %2 commands that can be used" + + "\nโ”‚ ยป Type %3help to view the details of how to use that command" + + "\nโ”‚ %4" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + commandNotFound: "Command \"%1\" does not exist", + getInfoCommand: "โ•ญโ”€โ”€ NAME โ”€โ”€โ”€โ”€โญ“" + + "\nโ”‚ %1" + + "\nโ”œโ”€โ”€ INFO" + + "\nโ”‚ Description: %2" + + "\nโ”‚ Other names: %3" + + "\nโ”‚ Other names in your group: %4" + + "\nโ”‚ Version: %5" + + "\nโ”‚ Role: %6" + + "\nโ”‚ Time per command: %7s" + + "\nโ”‚ Author: %8" + + "\nโ”œโ”€โ”€ USAGE" + + "\nโ”‚%9" + + "\nโ”œโ”€โ”€ NOTES" + + "\nโ”‚ The content inside can be changed" + + "\nโ”‚ The content inside [a|b|c] is a or b or c" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โญ”", + onlyInfo: "โ•ญโ”€โ”€ INFO โ”€โ”€โ”€โ”€โญ“" + + "\nโ”‚ Command name: %1" + + "\nโ”‚ Description: %2" + + "\nโ”‚ Other names: %3" + + "\nโ”‚ Other names in your group: %4" + + "\nโ”‚ Version: %5" + + "\nโ”‚ Role: %6" + + "\nโ”‚ Time per command: %7s" + + "\nโ”‚ Author: %8" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + onlyUsage: "โ•ญโ”€โ”€ USAGE โ”€โ”€โ”€โ”€โญ“" + + "\nโ”‚%1" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + onlyAlias: "โ•ญโ”€โ”€ ALIAS โ”€โ”€โ”€โ”€โญ“" + + "\nโ”‚ Other names: %1" + + "\nโ”‚ Other names in your group: %2" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + onlyRole: "โ•ญโ”€โ”€ ROLE โ”€โ”€โ”€โ”€โญ“" + + "\nโ”‚%1" + + "\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โญ“", + doNotHave: "Do not have", + roleText0: "0 (All users)", + roleText1: "1 (Group administrators)", + roleText2: "2 (Admin bot)", + roleText0setRole: "0 (set role, all users)", + roleText1setRole: "1 (set role, group administrators)", + pageNotFound: "Page %1 does not exist" + } + }, - onStart: async function ({ message, args, event, threadsData, getLang, role, globalData }) { - const langCode = await threadsData.get(event.threadID, "data.lang") || global.GoatBot.config.language; - let customLang = {}; - const pathCustomLang = path.normalize(`${process.cwd()}/languages/cmds/${langCode}.js`); - if (fs.existsSync(pathCustomLang)) - customLang = require(pathCustomLang); + onStart: async function ({ message, args, event, threadsData, getLang, role, globalData }) { + const langCode = await threadsData.get(event.threadID, "data.lang") || global.GoatBot.config.language; + let customLang = {}; + const pathCustomLang = path.normalize(`${process.cwd()}/languages/cmds/${langCode}.js`); + if (fs.existsSync(pathCustomLang)) + customLang = require(pathCustomLang); - const { threadID } = event; - const threadData = await threadsData.get(threadID); - const prefix = getPrefix(threadID); - let sortHelp = threadData.settings.sortHelp || "name"; - if (!["category", "name"].includes(sortHelp)) - sortHelp = "name"; - const commandName = (args[0] || "").toLowerCase(); - let command = commands.get(commandName) || commands.get(aliases.get(commandName)); - const aliasesData = threadData.data.aliases || { - // uid: ["userid", "id"] - }; - if (!command) { - for (const cmdName in aliasesData) { - if (aliasesData[cmdName].includes(commandName)) { - command = commands.get(cmdName); - break; - } - } - } + const { threadID } = event; + const threadData = await threadsData.get(threadID); + const prefix = getPrefix(threadID); + let sortHelp = threadData.settings.sortHelp || "name"; + if (!["category", "name"].includes(sortHelp)) + sortHelp = "name"; + const commandName = (args[0] || "").toLowerCase(); + let command = commands.get(commandName) || commands.get(aliases.get(commandName)); + const aliasesData = threadData.data.aliases || { + // uid: ["userid", "id"] + }; + if (!command) { + for (const cmdName in aliasesData) { + if (aliasesData[cmdName].includes(commandName)) { + command = commands.get(cmdName); + break; + } + } + } - if (!command) { - const globalAliasesData = await globalData.get('setalias', 'data', []); - // [{ - // commandName: "uid", - // aliases: ["uid", "id] - // }] - for (const item of globalAliasesData) { - if (item.aliases.includes(commandName)) { - command = commands.get(item.commandName); - break; - } - } - } + if (!command) { + const globalAliasesData = await globalData.get('setalias', 'data', []); + // [{ + // commandName: "uid", + // aliases: ["uid", "id] + // }] + for (const item of globalAliasesData) { + if (item.aliases.includes(commandName)) { + command = commands.get(item.commandName); + break; + } + } + } - // โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” LIST ALL COMMAND โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” // - if (!command && !args[0] || !isNaN(args[0])) { - const arrayInfo = []; - let msg = ""; - if (sortHelp == "name") { - const page = parseInt(args[0]) || 1; - const numberOfOnePage = 30; - for (const [name, value] of commands) { - if (value.config.role > 1 && role < value.config.role) - continue; - let describe = name; - let description; - const descriptionCustomLang = customLang[name]?.description; - if (descriptionCustomLang != undefined) - description = checkLangObject(descriptionCustomLang, langCode); - else if (value.config.description) - description = checkLangObject(value.config.description, langCode); - if (description) - describe += `: ${cropContent(description.charAt(0).toUpperCase() + description.slice(1), 50)}`; - arrayInfo.push({ - data: describe, - priority: value.priority || 0 - }); - } + // โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” LIST ALL COMMAND โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” // + if (!command && !args[0] || !isNaN(args[0])) { + const arrayInfo = []; + let msg = ""; + if (sortHelp == "name") { + const page = parseInt(args[0]) || 1; + const numberOfOnePage = 30; + for (const [name, value] of commands) { + if (value.config.role > 1 && role < value.config.role) + continue; + let describe = name; + let description; + const descriptionCustomLang = customLang[name]?.description; + if (descriptionCustomLang != undefined) + description = checkLangObject(descriptionCustomLang, langCode); + else if (value.config.description) + description = checkLangObject(value.config.description, langCode); + if (description) + describe += `: ${cropContent(description.charAt(0).toUpperCase() + description.slice(1), 50)}`; + arrayInfo.push({ + data: describe, + priority: value.priority || 0 + }); + } - arrayInfo.sort((a, b) => a.data - b.data); // sort by name - arrayInfo.sort((a, b) => a.priority > b.priority ? -1 : 1); // sort by priority - const { allPage, totalPage } = global.utils.splitPage(arrayInfo, numberOfOnePage); - if (page < 1 || page > totalPage) - return message.reply(getLang("pageNotFound", page)); + arrayInfo.sort((a, b) => a.data - b.data); // sort by name + arrayInfo.sort((a, b) => a.priority > b.priority ? -1 : 1); // sort by priority + const { allPage, totalPage } = global.utils.splitPage(arrayInfo, numberOfOnePage); + if (page < 1 || page > totalPage) + return message.reply(getLang("pageNotFound", page)); - const returnArray = allPage[page - 1] || []; - const startNumber = (page - 1) * numberOfOnePage + 1; - msg += (returnArray || []).reduce((text, item, index) => text += `โ”‚ ${index + startNumber}${index + startNumber < 10 ? " " : ""}. ${item.data}\n`, '').slice(0, -1); - await message.reply(getLang("help", msg, page, totalPage, commands.size, prefix, doNotDelete)); - } - else if (sortHelp == "category") { - for (const [, value] of commands) { - if (value.config.role > 1 && role < value.config.role) - continue; // if role of command > role of user => skip - const indexCategory = arrayInfo.findIndex(item => (item.category || "NO CATEGORY") == (value.config.category?.toLowerCase() || "NO CATEGORY")); + const returnArray = allPage[page - 1] || []; + const startNumber = (page - 1) * numberOfOnePage + 1; + msg += (returnArray || []).reduce((text, item, index) => text += `โ”‚ ${index + startNumber}${index + startNumber < 10 ? " " : ""}. ${item.data}\n`, '').slice(0, -1); + await message.reply(getLang("help", msg, page, totalPage, commands.size, prefix, doNotDelete)); + } + else if (sortHelp == "category") { + for (const [, value] of commands) { + if (value.config.role > 1 && role < value.config.role) + continue; // if role of command > role of user => skip + const indexCategory = arrayInfo.findIndex(item => (item.category || "NO CATEGORY") == (value.config.category?.toLowerCase() || "NO CATEGORY")); - if (indexCategory != -1) - arrayInfo[indexCategory].names.push(value.config.name); - else - arrayInfo.push({ - category: value.config.category.toLowerCase(), - names: [value.config.name] - }); - } - arrayInfo.sort((a, b) => (a.category < b.category ? -1 : 1)); - arrayInfo.forEach((data, index) => { - const categoryUpcase = `${index == 0 ? `โ•ญ` : `โ”œ`}โ”€โ”€โ”€ ${data.category.toUpperCase()} ${index == 0 ? "โญ“" : "โญ”"}`; - data.names = data.names.sort().map(item => item = `โ”‚ ${item}`); - msg += `${categoryUpcase}\n${data.names.join("\n")}\n`; - }); - message.reply(getLang("help2", msg, commands.size, prefix, doNotDelete)); - } - } - // โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” COMMAND DOES NOT EXIST โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” // - else if (!command && args[0]) { - return message.reply(getLang("commandNotFound", args[0])); - } - // โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” INFO COMMAND โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” // - else { - const formSendMessage = {}; - const configCommand = command.config; + if (indexCategory != -1) + arrayInfo[indexCategory].names.push(value.config.name); + else + arrayInfo.push({ + category: value.config.category.toLowerCase(), + names: [value.config.name] + }); + } + arrayInfo.sort((a, b) => (a.category < b.category ? -1 : 1)); + arrayInfo.forEach((data, index) => { + const categoryUpcase = `${index == 0 ? `โ•ญ` : `โ”œ`}โ”€โ”€โ”€ ${data.category.toUpperCase()} ${index == 0 ? "โญ“" : "โญ”"}`; + data.names = data.names.sort().map(item => item = `โ”‚ ${item}`); + msg += `${categoryUpcase}\n${data.names.join("\n")}\n`; + }); + message.reply(getLang("help2", msg, commands.size, prefix, doNotDelete)); + } + } + // โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” COMMAND DOES NOT EXIST โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” // + else if (!command && args[0]) { + return message.reply(getLang("commandNotFound", args[0])); + } + // โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” INFO COMMAND โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” // + else { + const formSendMessage = {}; + const configCommand = command.config; - let guide = configCommand.guide?.[langCode] || configCommand.guide?.["en"]; - if (guide == undefined) - guide = customLang[configCommand.name]?.guide?.[langCode] || customLang[configCommand.name]?.guide?.["en"]; + let guide = configCommand.guide?.[langCode] || configCommand.guide?.["en"]; + if (guide == undefined) + guide = customLang[configCommand.name]?.guide?.[langCode] || customLang[configCommand.name]?.guide?.["en"]; - guide = guide || { - body: "" - }; - if (typeof guide == "string") - guide = { body: guide }; - const guideBody = guide.body - .replace(/\{prefix\}|\{p\}/g, prefix) - .replace(/\{name\}|\{n\}/g, configCommand.name) - .replace(/\{pn\}/g, prefix + configCommand.name); + guide = guide || { + body: "" + }; + if (typeof guide == "string") + guide = { body: guide }; + const guideBody = guide.body + .replace(/\{prefix\}|\{p\}/g, prefix) + .replace(/\{name\}|\{n\}/g, configCommand.name) + .replace(/\{pn\}/g, prefix + configCommand.name); - const aliasesString = configCommand.aliases ? configCommand.aliases.join(", ") : getLang("doNotHave"); - const aliasesThisGroup = threadData.data.aliases ? (threadData.data.aliases[configCommand.name] || []).join(", ") : getLang("doNotHave"); + const aliasesString = configCommand.aliases ? configCommand.aliases.join(", ") : getLang("doNotHave"); + const aliasesThisGroup = threadData.data.aliases ? (threadData.data.aliases[configCommand.name] || []).join(", ") : getLang("doNotHave"); - let roleOfCommand = configCommand.role; - let roleIsSet = false; - if (threadData.data.setRole?.[configCommand.name]) { - roleOfCommand = threadData.data.setRole[configCommand.name]; - roleIsSet = true; - } + let roleOfCommand = configCommand.role; + let roleIsSet = false; + if (threadData.data.setRole?.[configCommand.name]) { + roleOfCommand = threadData.data.setRole[configCommand.name]; + roleIsSet = true; + } - const roleText = roleOfCommand == 0 ? - (roleIsSet ? getLang("roleText0setRole") : getLang("roleText0")) : - roleOfCommand == 1 ? - (roleIsSet ? getLang("roleText1setRole") : getLang("roleText1")) : - getLang("roleText2"); + const roleText = roleOfCommand == 0 ? + (roleIsSet ? getLang("roleText0setRole") : getLang("roleText0")) : + roleOfCommand == 1 ? + (roleIsSet ? getLang("roleText1setRole") : getLang("roleText1")) : + getLang("roleText2"); - const author = configCommand.author; - const descriptionCustomLang = customLang[configCommand.name]?.description; - let description = checkLangObject(configCommand.description, langCode); - if (description == undefined) - if (descriptionCustomLang != undefined) - description = checkLangObject(descriptionCustomLang, langCode); - else - description = getLang("doNotHave"); + const author = configCommand.author; + const descriptionCustomLang = customLang[configCommand.name]?.description; + let description = checkLangObject(configCommand.description, langCode); + if (description == undefined) + if (descriptionCustomLang != undefined) + description = checkLangObject(descriptionCustomLang, langCode); + else + description = getLang("doNotHave"); - let sendWithAttachment = false; // check subcommand need send with attachment or not + let sendWithAttachment = false; // check subcommand need send with attachment or not - if (args[1]?.match(/^-g|guide|-u|usage$/)) { - formSendMessage.body = getLang("onlyUsage", guideBody.split("\n").join("\nโ”‚")); - sendWithAttachment = true; - } - else if (args[1]?.match(/^-a|alias|aliase|aliases$/)) - formSendMessage.body = getLang("onlyAlias", aliasesString, aliasesThisGroup); - else if (args[1]?.match(/^-r|role$/)) - formSendMessage.body = getLang("onlyRole", roleText); - else if (args[1]?.match(/^-i|info$/)) - formSendMessage.body = getLang( - "onlyInfo", - configCommand.name, - description, - aliasesString, - aliasesThisGroup, - configCommand.version, - roleText, - configCommand.countDown || 1, - author || "" - ); - else { - formSendMessage.body = getLang( - "getInfoCommand", - configCommand.name, - description, - aliasesString, - aliasesThisGroup, - configCommand.version, - roleText, - configCommand.countDown || 1, - author || "", - guideBody.split("\n").join("\nโ”‚") - ); - sendWithAttachment = true; - } - - if (sendWithAttachment && guide.attachment) { - if (typeof guide.attachment == "object" && !Array.isArray(guide.attachment)) { - const promises = []; - formSendMessage.attachment = []; - - for (const keyPathFile in guide.attachment) { - const pathFile = path.normalize(keyPathFile); - - if (!fs.existsSync(pathFile)) { - const cutDirPath = path.dirname(pathFile).split(path.sep); - for (let i = 0; i < cutDirPath.length; i++) { - const pathCheck = `${cutDirPath.slice(0, i + 1).join(path.sep)}${path.sep}`; // create path - if (!fs.existsSync(pathCheck)) - fs.mkdirSync(pathCheck); // create folder - } - const getFilePromise = axios.get(guide.attachment[keyPathFile], { responseType: 'arraybuffer' }) - .then(response => { - fs.writeFileSync(pathFile, Buffer.from(response.data)); - }); - - promises.push({ - pathFile, - getFilePromise - }); - } - else { - promises.push({ - pathFile, - getFilePromise: Promise.resolve() - }); - } - } - - await Promise.all(promises.map(item => item.getFilePromise)); - for (const item of promises) - formSendMessage.attachment.push(fs.createReadStream(item.pathFile)); - } - } - - return message.reply(formSendMessage); - } - } -}; - -function checkLangObject(data, langCode) { - if (typeof data == "string") - return data; - if (typeof data == "object" && !Array.isArray(data)) - return data[langCode] || data.en || undefined; - return undefined; -} - -function cropContent(content, max) { - if (content.length > max) { - content = content.slice(0, max - 3); - content = content + "..."; - } - return content; -} \ No newline at end of file + if (args[1]?.match(/^-g|guide|-u|usage$/)) { + formSendMessage.body = getLang("onlyUsage", guideBody.split("\n").join("\nโ”‚")); + sendWithAttachment = true; + } + else if (args[1]?.match(/^-a|alias|aliase|aliases$/)) + formSendMessage.body = getLang("onlyAlias", aliasesString, aliasesThisGroup); + else if (args[1]?.match(/^-r|role$/)) + formSendMessage.body = getLang("onlyRole", roleText); + else if (args[1]?.match(/^-i|info$/)) + formSendMessage.body = getLang( + "onlyInfo", + configCommand.name, + description, + aliasesString, + aliasesThisGroup, + configCommand.version, + roleText, + configCommand.countDown || 1, + author || "" + ); + else { + formSendMessage.body = getLang( + "getInfoCommand", + configCommand.name, + description, + aliases \ No newline at end of file From 5ad9e30db0ee6acce8d3620885753f045dca8e4c Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:18:34 +0800 Subject: [PATCH 027/121] Update help.js --- scripts/cmds/help.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmds/help.js b/scripts/cmds/help.js index 2028434ffd..45682609cd 100644 --- a/scripts/cmds/help.js +++ b/scripts/cmds/help.js @@ -1,5 +1,5 @@ const fs = require("fs-extra"); -const axios = require("axios"); +const axios = require("axios");b const path = require("path"); const { getPrefix } = global.utils; const { commands, aliases } = global.GoatBot; From 29f8ea480f117bae43be1c55f305f0fb3860552c Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Sat, 23 Mar 2024 17:00:11 +0800 Subject: [PATCH 028/121] Update ai.js --- scripts/cmds/ai.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmds/ai.js b/scripts/cmds/ai.js index 7387fe406e..630f002c34 100644 --- a/scripts/cmds/ai.js +++ b/scripts/cmds/ai.js @@ -2,4 +2,4 @@ const axios=require('axios'); const apiEndpoint='https://sandipapi.onrender.com/gpt'; -module.exports={config:{name:"ai",version:1.0,author:"coffee",longDescription:"AI",category:"ai",guide:{en:"{p}questions"}},onStart:async()=>{},onChat:async({event,message})=>{try{const{body}=event;if(!(body&&body.toLowerCase().startsWith("ai")))return;const prompt=body.substring(2).trim();if(!prompt)return await message.reply("๐€๐๐’๐„๐‹|๐ŸŒ \nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”\nHi! Ask me anything!\nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”");const response=await axios.get(`${apiEndpoint}?prompt=${encodeURIComponent(prompt)}`);if(response.status===200)await message.reply(`๐€๐๐’๐„๐‹ ๐€๐๐’๐–๐„๐‘๐„๐ƒ|โœ…\nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”\n${response.data.answer}\nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”`);else throw new Error(`Failed to fetch data. Status: ${response.status}`);}catch(error){console.error("Error:",error.message);}}}; \ No newline at end of file +module.exports={config:{name:"ai",version:1.0,author:"coffee",longDescription:"AI",category:"ai",guide:{en:"{p}questions"}},onStart:async()=>{},onChat:async({event,message})=>{try{const{body}=event;if(!(body&&body.toLowerCase().startsWith("ai")))return;const prompt=body.substring(2).trim();if(!prompt)return await message.reply("๐—ฃ๐—ฅ๐—ข๐——๐—œ๐—š๐—ฌ|๐ŸŸขโœ…\nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”\nHi! Ask me anything!\nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”");const response=await axios.get(`${apiEndpoint}?prompt=${encodeURIComponent(prompt)}`);if(response.status===200)await message.reply(`๐—ฃ๐—ฅ๐—ข๐——๐—œ๐—š๐—ฌ ๐—”๐—ก๐—ฆ๐—ช๐—˜๐—ฅ๐—˜๐——|โœ…\nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”\n${response.data.answer}\nโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”`);else throw new Error(`Failed to fetch data. Status: ${response.status}`);}catch(error){console.error("Error:",error.message);}}}; \ No newline at end of file From c153e520de4255b1132a29debba4719dbafb1285 Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Sat, 23 Mar 2024 17:21:15 +0800 Subject: [PATCH 029/121] Update uptime.js --- scripts/cmds/uptime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmds/uptime.js b/scripts/cmds/uptime.js index 93d20aec9f..15ecbc7b44 100644 --- a/scripts/cmds/uptime.js +++ b/scripts/cmds/uptime.js @@ -28,7 +28,7 @@ aliases: ["upt"], const uptimeString = `${hours} Hrs ${minutes} mins ${seconds} secs...`; - api.sendMessage(`ANSEL ACTIVE โš™๏ธโžก๏ธใ€Œ ๐™พ๐š—๐š•๐š’๐š—๐šŽ ใ€\n ${uptimeString}`, event.threadID); + api.sendMessage(`ARTIF INTELL โš™๏ธ๐ŸŸขโœ…ใ€Œ ๐™พ๐š—๐š•๐š’๐š—๐šŽ ใ€\n ${uptimeString}`, event.threadID); } catch (error) { console.error(error); api.sendMessage("An error occurred while retrieving data.", event.threadID); From 455218336e1b2cb13d8bf41d7f0ce0c194f4e01d Mon Sep 17 00:00:00 2001 From: C4Kitakyushu <156558807+C4Kitakyushu@users.noreply.github.com> Date: Sat, 23 Mar 2024 19:58:28 +0800 Subject: [PATCH 030/121] Update help.js --- scripts/cmds/help.js | 586 ++++++++++++++++++------------------------- 1 file changed, 248 insertions(+), 338 deletions(-) diff --git a/scripts/cmds/help.js b/scripts/cmds/help.js index 45682609cd..b0431dd4c1 100644 --- a/scripts/cmds/help.js +++ b/scripts/cmds/help.js @@ -1,340 +1,250 @@ -const fs = require("fs-extra"); -const axios = require("axios");b -const path = require("path"); -const { getPrefix } = global.utils; -const { commands, aliases } = global.GoatBot; -const doNotDelete = "[ ARTNINTEL๐Ÿค–๐ŸŒ ANSEL ]"; -/** -* @author NTKhang -* @author: do not delete it -* @message if you delete or edit it you will get a global ban -*/ +const commandInfoMap = { + ai: { + name: "ai", + description: "Ai Based on GPT-4", + guide: "-ai what is life?" + }, + knight: { + name: "knight", + description: "a medieval knight that has been called upon as an ai you can talk to", + guide: "-knight tell me about yourself." + }, +axis: { + name: "axis", + description: "an ai you can ask for anything", + guide: "-axis what is life?" + }, + join: { + name: "join", + description: "Join existing group chats where the bot is in.", + guide: "-join" + }, + opm: { + name: "opm", + description: "sends random opm (original pilipino music)", + guide: "-opm" + }, + video: { + name: "video", + description: "searches and sends youtube video (mostly use between 1-7mins)", + guide: "-video