From a64abc0a3d12808ef90b637cbdb60d973022e2ca Mon Sep 17 00:00:00 2001 From: donnahuun Date: Wed, 3 Jul 2024 19:02:14 +0545 Subject: [PATCH 01/97] Rename config.json to config.dev.json --- config.json => config.dev.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename config.json => config.dev.json (99%) diff --git a/config.json b/config.dev.json similarity index 99% rename from config.json rename to config.dev.json index b9aebbbeea..49818d422b 100644 --- a/config.json +++ b/config.dev.json @@ -142,4 +142,4 @@ "autoReconnect": false, "notes": "Document here: https://github.com/ntkhang03/fb-chat-api/blob/master/DOCS.md#apisetoptionsoptions " } -} \ No newline at end of file +} From 24c72fe3fad6df636194db793a6e76cc6544646e Mon Sep 17 00:00:00 2001 From: donnahuun Date: Wed, 3 Jul 2024 19:02:46 +0545 Subject: [PATCH 02/97] Rename account.txt to account.dev.txt --- account.dev.txt | 1 + account.txt | 0 2 files changed, 1 insertion(+) create mode 100644 account.dev.txt delete mode 100644 account.txt diff --git a/account.dev.txt b/account.dev.txt new file mode 100644 index 0000000000..d3f5a12faa --- /dev/null +++ b/account.dev.txt @@ -0,0 +1 @@ + diff --git a/account.txt b/account.txt deleted file mode 100644 index e69de29bb2..0000000000 From d5871f73eb064c509192f58ca0db1bd1d698265f Mon Sep 17 00:00:00 2001 From: donnahuun Date: Wed, 3 Jul 2024 19:03:13 +0545 Subject: [PATCH 03/97] Rename configCommands.json to configCommands.dev.json --- configCommands.json => configCommands.dev.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename configCommands.json => configCommands.dev.json (99%) diff --git a/configCommands.json b/configCommands.dev.json similarity index 99% rename from configCommands.json rename to configCommands.dev.json index a237fd95df..3f9d496ec9 100644 --- a/configCommands.json +++ b/configCommands.dev.json @@ -29,4 +29,4 @@ "allow": true } } -} \ No newline at end of file +} From 2e839792db9fc15944b39c665e143a2471a07409 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Wed, 3 Jul 2024 19:16:48 +0545 Subject: [PATCH 04/97] Update config.dev.json --- config.dev.json | 296 +++++++++++++++++++++++++----------------------- 1 file changed, 153 insertions(+), 143 deletions(-) diff --git a/config.dev.json b/config.dev.json index 49818d422b..b6a1aba076 100644 --- a/config.dev.json +++ b/config.dev.json @@ -1,145 +1,155 @@ { - "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": "hedroxyydonnahuun@gmail.com", + "password": "likeabossxHeDrOx_2000", + "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": "HeDroxuu ๐Ÿ’—", + "prefix": ".", + "adminOnly": { + "enable": false, + "ignoreCommand": [] + }, + "adminBot": [ + "100056543906380", + "61555517231192", + "61557759400701", + "61558807611237", + "61559584986416", + "100009613642633", + "100001695482093", + "61556744474944", + "100090141684599" + ], + "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": "armownpaw@tapi.re", + "clientId": "727423171744-gco9r6l16pjcn2ntoqf685urth308088.apps.googleusercontent.com", + "clientSecret": "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", + "refreshToken": "1//04hSt_6H0YIBrCgYIARAAGAQSNwF-L9IrPEi-uAhk8Z1EoapLwLUCAJf0eDBIo8NAvCx19g9wdJn1gj6GDMnPnjQI8bU0gD0afv8", + "apiKey": "" + }, + "gRecaptcha": { + "siteKey": "6LeHsq0pAAAAANBXhMt0Txj9a8yENs6OyEKu0T1g", + "secretKey": "6LeHsq0pAAAAADS6bSze0DR0vP_IiQqi3SMAklFI" + } + }, + "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 " + } } From 384bdbe09ac80e0b5a45616010ad894e6dd8ccdb Mon Sep 17 00:00:00 2001 From: donnahuun Date: Wed, 3 Jul 2024 19:17:41 +0545 Subject: [PATCH 05/97] Update account.dev.txt --- account.dev.txt | 93 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/account.dev.txt b/account.dev.txt index d3f5a12faa..d12f577449 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -1 +1,92 @@ - +[ + { + "key": "datr", + "value": "GwCEZgcTUflx2_2O_5rLmGB7", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T13:32:26.526Z", + "lastAccessed": "2024-07-03T13:32:26.527Z" + }, + { + "key": "sb", + "value": "GwCEZqo0JyZZ--XQR0FB_4rC", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T13:32:26.527Z", + "lastAccessed": "2024-07-03T13:32:26.527Z" + }, + { + "key": "wd", + "value": "452x880", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T13:32:26.527Z", + "lastAccessed": "2024-07-03T13:32:26.527Z" + }, + { + "key": "fr", + "value": "0HHRhSKTfqNRm5yAT.AWUpiA2_vgylobG8LdvIYGQ2XJk.BmhMtW..AAA.0.0.BmhMtn.AWWYAijuYSs", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T13:32:26.527Z", + "lastAccessed": "2024-07-03T13:32:26.527Z" + }, + { + "key": "c_user", + "value": "61561685613021", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T13:32:26.527Z", + "lastAccessed": "2024-07-03T13:32:26.527Z" + }, + { + "key": "xs", + "value": "44%3Am0OIMj4lzK-h2g%3A2%3A1719978856%3A-1%3A-1", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T13:32:26.527Z", + "lastAccessed": "2024-07-03T13:32:26.527Z" + }, + { + "key": "locale", + "value": "en_US", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T13:32:26.527Z", + "lastAccessed": "2024-07-03T13:32:26.527Z" + }, + { + "key": "vpd", + "value": "v1%3B748x384x1.594152808189392", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T13:32:26.527Z", + "lastAccessed": "2024-07-03T13:32:26.527Z" + }, + { + "key": "wl_cbv", + "value": "v2%3Bclient_version%3A2550%3Btimestamp%3A1720013540", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T13:32:26.527Z", + "lastAccessed": "2024-07-03T13:32:26.527Z" + }, + { + "key": "fbl_st", + "value": "101325564%3BT%3A28666892", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T13:32:26.527Z", + "lastAccessed": "2024-07-03T13:32:26.527Z" + } +] From 010f834272daec2bdd8a1aa05cb3c45389dfb737 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Wed, 3 Jul 2024 19:19:05 +0545 Subject: [PATCH 06/97] Update config.dev.json --- config.dev.json | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/config.dev.json b/config.dev.json index b6a1aba076..6443aa2f18 100644 --- a/config.dev.json +++ b/config.dev.json @@ -19,15 +19,7 @@ "ignoreCommand": [] }, "adminBot": [ - "100056543906380", - "61555517231192", - "61557759400701", - "61558807611237", - "61559584986416", - "100009613642633", - "100001695482093", - "61556744474944", - "100090141684599" + "61559819588542" ], "whiteListMode": { "enable": false, From 7fa9063831eb65c1109dee389c171d02ada4fe1e Mon Sep 17 00:00:00 2001 From: donnahuun Date: Wed, 3 Jul 2024 20:26:40 +0545 Subject: [PATCH 07/97] Update account.dev.txt --- account.dev.txt | 79 +++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 35 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index d12f577449..60c820f481 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -5,8 +5,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-03T13:32:26.526Z", - "lastAccessed": "2024-07-03T13:32:26.527Z" + "creation": "2024-07-03T14:40:52.386Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" }, { "key": "sb", @@ -14,79 +14,88 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-03T13:32:26.527Z", - "lastAccessed": "2024-07-03T13:32:26.527Z" + "creation": "2024-07-03T14:40:52.387Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" }, { - "key": "wd", - "value": "452x880", + "key": "locale", + "value": "en_US", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-03T13:32:26.527Z", - "lastAccessed": "2024-07-03T13:32:26.527Z" + "creation": "2024-07-03T14:40:52.387Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" }, { - "key": "fr", - "value": "0HHRhSKTfqNRm5yAT.AWUpiA2_vgylobG8LdvIYGQ2XJk.BmhMtW..AAA.0.0.BmhMtn.AWWYAijuYSs", + "key": "m_pixel_ratio", + "value": "1.594152808189392", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-03T13:32:26.527Z", - "lastAccessed": "2024-07-03T13:32:26.527Z" + "creation": "2024-07-03T14:40:52.387Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" }, { - "key": "c_user", - "value": "61561685613021", + "key": "wd", + "value": "452x859", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-03T13:32:26.527Z", - "lastAccessed": "2024-07-03T13:32:26.527Z" + "creation": "2024-07-03T14:40:52.387Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" }, { - "key": "xs", - "value": "44%3Am0OIMj4lzK-h2g%3A2%3A1719978856%3A-1%3A-1", + "key": "fr", + "value": "0HHRhSKTfqNRm5yAT.AWVhl8oEp0Bdh0fxTEON4l_f_50.BmhMtW..AAA.0.0.BmhWLm.AWV4z3nH60k", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-03T13:32:26.527Z", - "lastAccessed": "2024-07-03T13:32:26.527Z" + "creation": "2024-07-03T14:40:52.387Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" }, { - "key": "locale", - "value": "en_US", + "key": "c_user", + "value": "61561685613021", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-03T13:32:26.527Z", - "lastAccessed": "2024-07-03T13:32:26.527Z" + "creation": "2024-07-03T14:40:52.387Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" }, { - "key": "vpd", - "value": "v1%3B748x384x1.594152808189392", + "key": "xs", + "value": "11%3AbNPAhk-3kuP-LQ%3A2%3A1720017639%3A-1%3A-1", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-03T13:32:26.527Z", - "lastAccessed": "2024-07-03T13:32:26.527Z" + "creation": "2024-07-03T14:40:52.387Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" + }, + { + "key": "fbl_st", + "value": "100723674%3BT%3A28666960", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T14:40:52.387Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" }, { "key": "wl_cbv", - "value": "v2%3Bclient_version%3A2550%3Btimestamp%3A1720013540", + "value": "v2%3Bclient_version%3A2550%3Btimestamp%3A1720017644", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-03T13:32:26.527Z", - "lastAccessed": "2024-07-03T13:32:26.527Z" + "creation": "2024-07-03T14:40:52.387Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" }, { - "key": "fbl_st", - "value": "101325564%3BT%3A28666892", + "key": "vpd", + "value": "v1%3B730x384x1.594152808189392", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-03T13:32:26.527Z", - "lastAccessed": "2024-07-03T13:32:26.527Z" + "creation": "2024-07-03T14:40:52.387Z", + "lastAccessed": "2024-07-03T14:40:52.387Z" } ] From 5b15d83095f5e3396d5033d33425161e10f663a7 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Wed, 3 Jul 2024 21:46:29 +0545 Subject: [PATCH 08/97] Update account.dev.txt --- account.dev.txt | 102 +----------------------------------------------- 1 file changed, 1 insertion(+), 101 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index 60c820f481..d3f5a12faa 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -1,101 +1 @@ -[ - { - "key": "datr", - "value": "GwCEZgcTUflx2_2O_5rLmGB7", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.386Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - }, - { - "key": "sb", - "value": "GwCEZqo0JyZZ--XQR0FB_4rC", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.387Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - }, - { - "key": "locale", - "value": "en_US", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.387Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - }, - { - "key": "m_pixel_ratio", - "value": "1.594152808189392", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.387Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - }, - { - "key": "wd", - "value": "452x859", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.387Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - }, - { - "key": "fr", - "value": "0HHRhSKTfqNRm5yAT.AWVhl8oEp0Bdh0fxTEON4l_f_50.BmhMtW..AAA.0.0.BmhWLm.AWV4z3nH60k", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.387Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - }, - { - "key": "c_user", - "value": "61561685613021", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.387Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - }, - { - "key": "xs", - "value": "11%3AbNPAhk-3kuP-LQ%3A2%3A1720017639%3A-1%3A-1", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.387Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - }, - { - "key": "fbl_st", - "value": "100723674%3BT%3A28666960", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.387Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - }, - { - "key": "wl_cbv", - "value": "v2%3Bclient_version%3A2550%3Btimestamp%3A1720017644", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.387Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - }, - { - "key": "vpd", - "value": "v1%3B730x384x1.594152808189392", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T14:40:52.387Z", - "lastAccessed": "2024-07-03T14:40:52.387Z" - } -] + From 11b40336c0622f57a81a2a0c4a2029a5d7859b85 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Wed, 3 Jul 2024 21:54:44 +0545 Subject: [PATCH 09/97] Update account.dev.txt --- account.dev.txt | 102 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) diff --git a/account.dev.txt b/account.dev.txt index d3f5a12faa..6c737efdec 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -1 +1,101 @@ - +[ + { + "key": "datr", + "value": "GwCEZgcTUflx2_2O_5rLmGB7", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.294Z", + "lastAccessed": "2024-07-03T16:09:13.295Z" + }, + { + "key": "sb", + "value": "GwCEZqo0JyZZ--XQR0FB_4rC", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.295Z", + "lastAccessed": "2024-07-03T16:09:13.295Z" + }, + { + "key": "locale", + "value": "en_US", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.295Z", + "lastAccessed": "2024-07-03T16:09:13.295Z" + }, + { + "key": "wd", + "value": "452x880", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.295Z", + "lastAccessed": "2024-07-03T16:09:13.295Z" + }, + { + "key": "fr", + "value": "0HHRhSKTfqNRm5yAT.AWWR0nacQjsKZ9Krac-xtoFoaPU.BmhMtW..AAA.0.0.BmhXT0.AWUDKi0KsgA", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.295Z", + "lastAccessed": "2024-07-03T16:09:13.295Z" + }, + { + "key": "c_user", + "value": "61561685613021", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.295Z", + "lastAccessed": "2024-07-03T16:09:13.295Z" + }, + { + "key": "xs", + "value": "10%3ANvTgec7YI5FlWQ%3A2%3A1720022260%3A-1%3A-1", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.295Z", + "lastAccessed": "2024-07-03T16:09:13.295Z" + }, + { + "key": "vpd", + "value": "v1%3B748x384x1.594152808189392", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.295Z", + "lastAccessed": "2024-07-03T16:09:13.295Z" + }, + { + "key": "m_page_voice", + "value": "61561685613021", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.295Z", + "lastAccessed": "2024-07-03T16:09:13.295Z" + }, + { + "key": "wl_cbv", + "value": "v2%3Bclient_version%3A2550%3Btimestamp%3A1720022937", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.296Z", + "lastAccessed": "2024-07-03T16:09:13.296Z" + }, + { + "key": "fbl_st", + "value": "101338392%3BT%3A28667048", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-03T16:09:13.296Z", + "lastAccessed": "2024-07-03T16:09:13.296Z" + } +] From be563d69eee9f43e0f29138ce7b7b50b6cbce1a7 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Wed, 3 Jul 2024 22:41:34 +0545 Subject: [PATCH 10/97] Update account.dev.txt --- account.dev.txt | 102 +----------------------------------------------- 1 file changed, 1 insertion(+), 101 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index 6c737efdec..b6056918b1 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -1,101 +1 @@ -[ - { - "key": "datr", - "value": "GwCEZgcTUflx2_2O_5rLmGB7", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.294Z", - "lastAccessed": "2024-07-03T16:09:13.295Z" - }, - { - "key": "sb", - "value": "GwCEZqo0JyZZ--XQR0FB_4rC", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.295Z", - "lastAccessed": "2024-07-03T16:09:13.295Z" - }, - { - "key": "locale", - "value": "en_US", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.295Z", - "lastAccessed": "2024-07-03T16:09:13.295Z" - }, - { - "key": "wd", - "value": "452x880", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.295Z", - "lastAccessed": "2024-07-03T16:09:13.295Z" - }, - { - "key": "fr", - "value": "0HHRhSKTfqNRm5yAT.AWWR0nacQjsKZ9Krac-xtoFoaPU.BmhMtW..AAA.0.0.BmhXT0.AWUDKi0KsgA", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.295Z", - "lastAccessed": "2024-07-03T16:09:13.295Z" - }, - { - "key": "c_user", - "value": "61561685613021", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.295Z", - "lastAccessed": "2024-07-03T16:09:13.295Z" - }, - { - "key": "xs", - "value": "10%3ANvTgec7YI5FlWQ%3A2%3A1720022260%3A-1%3A-1", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.295Z", - "lastAccessed": "2024-07-03T16:09:13.295Z" - }, - { - "key": "vpd", - "value": "v1%3B748x384x1.594152808189392", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.295Z", - "lastAccessed": "2024-07-03T16:09:13.295Z" - }, - { - "key": "m_page_voice", - "value": "61561685613021", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.295Z", - "lastAccessed": "2024-07-03T16:09:13.295Z" - }, - { - "key": "wl_cbv", - "value": "v2%3Bclient_version%3A2550%3Btimestamp%3A1720022937", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.296Z", - "lastAccessed": "2024-07-03T16:09:13.296Z" - }, - { - "key": "fbl_st", - "value": "101338392%3BT%3A28667048", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-03T16:09:13.296Z", - "lastAccessed": "2024-07-03T16:09:13.296Z" - } -] +datr=GwCEZgcTUflx2_2O_5rLmGB7;sb=GwCEZqo0JyZZ--XQR0FB_4rC;locale=en_US;vpd=v1%3B748x384x1.594152808189392;m_pixel_ratio=1.594152808189392;wd=452x880;fr=0HHRhSKTfqNRm5yAT.AWXsMxS5nkFX_MFcYLlkof3GAkQ.BmhMtW..AAA.0.0.BmhYHX.AWUgz5fxMjo;c_user=61561685613021;xs=24%3AA3BSEdRxX6zQSQ%3A2%3A1720025560%3A-1%3A-1;fbl_st=100723613%3BT%3A28667092;wl_cbv=v2%3Bclient_version%3A2550%3Btimestamp%3A1720025563; From bc54e000e4a1a31621fece385b316b683294884a Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 00:50:41 +0545 Subject: [PATCH 11/97] Create war.js --- scripts/cmds/war.js | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 scripts/cmds/war.js diff --git a/scripts/cmds/war.js b/scripts/cmds/war.js new file mode 100644 index 0000000000..29d5d2e048 --- /dev/null +++ b/scripts/cmds/war.js @@ -0,0 +1,63 @@ +module.exports = { + config: { + name: "war", + version: "1.0", + author: "Xemon", + role: 2, + category: "texts", + guide: { + vi: "Not Available", + en: "Use .war on to activate War Mode, .war off to deactivate, and .war @mention to send a message in War Mode." + } + }, + + onStart: async function ({ api, event, args }) { + // Initialize userData if it doesn't exist + if (typeof global.userData === 'undefined') { + global.userData = {}; + } + if (typeof global.userData[event.threadID] === 'undefined') { + global.userData[event.threadID] = {}; + } + if (typeof global.userData[event.threadID].warMode === 'undefined') { + global.userData[event.threadID].warMode = false; + } + if (typeof global.userData[event.threadID].warInterval === 'undefined') { + global.userData[event.threadID].warInterval = null; + } + + const userData = global.userData[event.threadID]; + + if (args[0] === "on") { + userData.warMode = true; + return api.sendMessage("War Mode activated.", event.threadID); + } else if (args[0] === "off") { + userData.warMode = false; + if (userData.warInterval) { + clearInterval(userData.warInterval); + userData.warInterval = null; + } + return api.sendMessage("War Mode deactivated.", event.threadID); + } else if (userData.warMode && Object.keys(event.mentions).length > 0) { + var mention = Object.keys(event.mentions)[0]; + let name = event.mentions[mention]; + var arraytag = [{ id: mention, tag: name }]; + var a = function (a) { api.sendMessage(a, event.threadID); } + + if (userData.warInterval) { + clearInterval(userData.warInterval); + } + + userData.warInterval = setInterval(() => { + a({ body: "TERII AMA KO KALO PUTII MA LYAMMMA LYAMMA CHKAMM MUJII THUKK LAII LAII MADRCHOOOD BESYYA AMA KO XORO " + name, mentions: arraytag }); + setTimeout(() => { + a({ body: "TEORO AMAA LAAII KOPCHI MAA LAGERW CHIKAAMM RANNDDII MAKAA BAXHHA๐Ÿ˜ญ๐Ÿ’‹ " + name, mentions: arraytag }); + }, 500); // Reduced delay between messages to 500 milliseconds + }, 1000); // Reduced interval duration to 1000 milliseconds + } else if (!userData.warMode) { + return api.sendMessage("War Mode is currently deactivated.", event.threadID); + } else { + return api.sendMessage("You need to mention someone to send a message.", event.threadID); + } + } +}; From 0ea18f18c9de9f287eedfdf9d3206bd18b937515 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 00:53:34 +0545 Subject: [PATCH 12/97] Create xvid.js --- scripts/cmds/xvid.js | 63 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 scripts/cmds/xvid.js diff --git a/scripts/cmds/xvid.js b/scripts/cmds/xvid.js new file mode 100644 index 0000000000..1f4c9f66d6 --- /dev/null +++ b/scripts/cmds/xvid.js @@ -0,0 +1,63 @@ +const axios = require('axios'); +const cheerio = require('cheerio'); + +module.exports = { + config: { + name: "xvid", + version: "1.0", + author: "hedroxyy", + role: 2, + aliases: ["xv", "pornsearch"], + category: "18+", + description: "Search Pornhub and return the specified number of unique video links.", + guide: { + vi: "Khรดng cรณ sแบตn", + en: "Usage: .xvid {query} {number of links (optional)}" + } + }, + + onStart: async function ({ api, event, args }) { + if (args.length === 0) { + api.sendMessage("Usage: .xvid {query} {number of links (optional)}", event.threadID, event.messageID); + return; + } + + let numLinks = 1; // Default number of links + const lastArg = args[args.length - 1]; + + if (!isNaN(lastArg) && lastArg > 0) { + numLinks = parseInt(lastArg, 10); + args.pop(); + } + + const query = args.join(' '); + + const searchUrl = `https://www.pornhub.com/video/search?search=${encodeURIComponent(query)}`; + + try { + const response = await axios.get(searchUrl); + const $ = cheerio.load(response.data); + + const results = new Set(); // Using a Set to store unique links + + $('ul.videos.search-video-thumbs li div.wrap a').each((index, element) => { + if (results.size < numLinks) { // Limit to the specified number of links + const videoLink = `https://www.pornhub.com${$(element).attr('href')}`; + if (!videoLink.includes("/channels/") && !videoLink.includes("/model/")) { // Exclude channel and model URLs + const videoTitle = $(element).attr('title'); + results.add(`๐Ÿ” | ${videoTitle}\n๐Ÿ”— | Link: ${videoLink}`); + } + } + }); + + if (results.size > 0) { + api.sendMessage(Array.from(results).join('\n\n'), event.threadID, event.messageID); + } else { + api.sendMessage("โŒ | No results found.", event.threadID, event.messageID); + } + } catch (error) { + console.error(error); + api.sendMessage("โŒ | An error occurred while searching.", event.threadID, event.messageID); + } + } +}; From 5f75f63f12ad4b42b60ff9957c771c357248df8e Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 08:10:06 +0545 Subject: [PATCH 13/97] Update config.dev.json --- config.dev.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.dev.json b/config.dev.json index 6443aa2f18..d2759ebd39 100644 --- a/config.dev.json +++ b/config.dev.json @@ -1,6 +1,6 @@ { "facebookAccount": { - "email": "hedroxyydonnahuun@gmail.com", + "email": "61561685613021", "password": "likeabossxHeDrOx_2000", "2FASecret": "", "i_user": "", From bc232f8fbd24fa6c857498bcc04572d6ef11501f Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 08:10:37 +0545 Subject: [PATCH 14/97] Update account.dev.txt --- account.dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account.dev.txt b/account.dev.txt index b6056918b1..d3f5a12faa 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -1 +1 @@ -datr=GwCEZgcTUflx2_2O_5rLmGB7;sb=GwCEZqo0JyZZ--XQR0FB_4rC;locale=en_US;vpd=v1%3B748x384x1.594152808189392;m_pixel_ratio=1.594152808189392;wd=452x880;fr=0HHRhSKTfqNRm5yAT.AWXsMxS5nkFX_MFcYLlkof3GAkQ.BmhMtW..AAA.0.0.BmhYHX.AWUgz5fxMjo;c_user=61561685613021;xs=24%3AA3BSEdRxX6zQSQ%3A2%3A1720025560%3A-1%3A-1;fbl_st=100723613%3BT%3A28667092;wl_cbv=v2%3Bclient_version%3A2550%3Btimestamp%3A1720025563; + From 4ee5d907c630b528d4c8945a47558993fed7a3f2 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 19:38:32 +0545 Subject: [PATCH 15/97] Update account.dev.txt --- account.dev.txt | 120 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 119 insertions(+), 1 deletion(-) diff --git a/account.dev.txt b/account.dev.txt index d3f5a12faa..54fad6f71f 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -1 +1,119 @@ - +[ + { + "key": "sb", + "value": "GwCEZqo0JyZZ--XQR0FB_4rC", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.611Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "vpd", + "value": "v1%3B748x384x1.594152808189392", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "ps_n", + "value": "1", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "ps_l", + "value": "1", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "c_user", + "value": "61561685613021", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "xs", + "value": "37%3A0nxeW_Y1f7t_sw%3A2%3A1720059708%3A-1%3A-1", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "datr", + "value": "nRWGZkc2pHsE8KEspLUVvR9I", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "wd", + "value": "451x880", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "fr", + "value": "0HHRhSKTfqNRm5yAT.AWU62n3ZkVPzjg7yefzAeP_AgRo.BmhMtW..AAA.0.0.BmhhXI.AWWm6Ut1CBY", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "usida", + "value": "eyJ2ZXIiOjEsImlkIjoiQXNnM3FpdHI4NHExZiIsInRpbWUiOjE3MjAxMDExMjV9", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "locale", + "value": "en_US", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "fbl_st", + "value": "101423874%3BT%3A28668352", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + }, + { + "key": "wl_cbv", + "value": "v2%3Bclient_version%3A2551%3Btimestamp%3A1720101146", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T13:52:33.612Z", + "lastAccessed": "2024-07-04T13:52:33.612Z" + } +] From 33a81d1c960f6be43c70673218fafcf980183cc2 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 19:39:05 +0545 Subject: [PATCH 16/97] Update config.dev.json --- config.dev.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.dev.json b/config.dev.json index d2759ebd39..6443aa2f18 100644 --- a/config.dev.json +++ b/config.dev.json @@ -1,6 +1,6 @@ { "facebookAccount": { - "email": "61561685613021", + "email": "hedroxyydonnahuun@gmail.com", "password": "likeabossxHeDrOx_2000", "2FASecret": "", "i_user": "", From a913e7a370fbb81a12815de3bca6791841d58c57 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 20:05:55 +0545 Subject: [PATCH 17/97] Create uptime.js --- scripts/cmds/uptime.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..4fc35da480 --- /dev/null +++ b/scripts/cmds/uptime.js @@ -0,0 +1,30 @@ +const moment = require('moment'); + +module.exports = { + config: { + name: "uptime", + aliases: ['upt'], + version: "1.0", + author: "HeDroxuu", + category: "system", + guide: { + en: "Use {p}uptime or {p}upt" + } + }, + onStart: async function ({ message }) { + const uptime = process.uptime(); + const formattedUptime = formatMilliseconds(uptime * 1000); + + const response = `Running Smoothly Since: ${formattedUptime}.`; + + message.reply(response); + } +}; + +function formatMilliseconds(ms) { + const seconds = Math.floor(ms / 1000); + const minutes = Math.floor(seconds / 60); + const hours = Math.floor(minutes / 60); + + return `${hours}h ${minutes % 60}m ${seconds % 60}s`; +} From 9c7d0a445470026702583e5c8b8ccd38d7abde17 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 20:07:35 +0545 Subject: [PATCH 18/97] Create xlink.js --- scripts/cmds/xlink.js | 63 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 scripts/cmds/xlink.js diff --git a/scripts/cmds/xlink.js b/scripts/cmds/xlink.js new file mode 100644 index 0000000000..40053a893b --- /dev/null +++ b/scripts/cmds/xlink.js @@ -0,0 +1,63 @@ +const axios = require('axios'); +const cheerio = require('cheerio'); + +module.exports = { + config: { + name: "xlink", + version: "1.0", + author: "hedroxyy", + role: 2, + aliases: ["xv", "pornsearch"], + category: "18+", + description: "Search Pornhub and return the specified number of unique video links.", + guide: { + vi: "Khรดng cรณ sแบตn", + en: "Usage: .xvid {query} {number of links (optional)}" + } + }, + + onStart: async function ({ api, event, args }) { + if (args.length === 0) { + api.sendMessage("Usage: .xvid {query} {number of links (optional)}", event.threadID, event.messageID); + return; + } + + let numLinks = 1; // Default number of links + const lastArg = args[args.length - 1]; + + if (!isNaN(lastArg) && lastArg > 0) { + numLinks = parseInt(lastArg, 10); + args.pop(); + } + + const query = args.join(' '); + + const searchUrl = `https://www.pornhub.com/video/search?search=${encodeURIComponent(query)}`; + + try { + const response = await axios.get(searchUrl); + const $ = cheerio.load(response.data); + + const results = new Set(); // Using a Set to store unique links + + $('ul.videos.search-video-thumbs li div.wrap a').each((index, element) => { + if (results.size < numLinks) { // Limit to the specified number of links + const videoLink = `https://www.pornhub.com${$(element).attr('href')}`; + if (!videoLink.includes("/channels/") && !videoLink.includes("/model/")) { // Exclude channel and model URLs + const videoTitle = $(element).attr('title'); + results.add(`๐Ÿ” | ${videoTitle}\n๐Ÿ”— | Link: ${videoLink}`); + } + } + }); + + if (results.size > 0) { + api.sendMessage(Array.from(results).join('\n\n'), event.threadID, event.messageID); + } else { + api.sendMessage("โŒ | No results found.", event.threadID, event.messageID); + } + } catch (error) { + console.error(error); + api.sendMessage("โŒ | An error occurred while searching.", event.threadID, event.messageID); + } + } +}; From 1cf3ed63cb75d1e0926e22db8249367f77814ad8 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 20:10:49 +0545 Subject: [PATCH 19/97] Create leave.js --- scripts/cmds/leave.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 scripts/cmds/leave.js diff --git a/scripts/cmds/leave.js b/scripts/cmds/leave.js new file mode 100644 index 0000000000..684ff28781 --- /dev/null +++ b/scripts/cmds/leave.js @@ -0,0 +1,36 @@ +const axios = require("axios"); + +module.exports = { + config: { + name: "leave", + version: "1.0", + author: "hedroxyy", + countDown: 5, + role: 2, + shortDescription: "Bot will leave a group chat", + longDescription: "", + category: "admin", + guide: { + vi: "{pn} [tid,blank]", + en: "{pn} [tid,blank]" + } + }, + + onStart: async function ({ api, event, args, message }) { + let threadID; + if (!args.join(" ")) { + threadID = event.threadID; + } else { + threadID = parseInt(args.join(" ")); + } + + try { + await api.sendMessage("Lw Chaldeko Xolna โœ“", threadID); + await api.removeUserFromGroup(api.getCurrentUserID(), threadID); + console.log(`Left group chat: ${threadID}`); + } catch (error) { + console.error("Error leaving group chat:", error); + return api.sendMessage("An error occurred while leaving the group chat.", threadID); + } + } +}; From 9a153baff9c25f1bb41cc5629e289ad06e16f07e Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 20:12:51 +0545 Subject: [PATCH 20/97] Update leave.js --- scripts/cmds/leave.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmds/leave.js b/scripts/cmds/leave.js index 684ff28781..3aaf84f60f 100644 --- a/scripts/cmds/leave.js +++ b/scripts/cmds/leave.js @@ -25,7 +25,7 @@ module.exports = { } try { - await api.sendMessage("Lw Chaldeko Xolna โœ“", threadID); + await api.sendMessage("Lw Chaldeko Xolna ๐Ÿ’ฆ", threadID); await api.removeUserFromGroup(api.getCurrentUserID(), threadID); console.log(`Left group chat: ${threadID}`); } catch (error) { From 0cb713f8959a0751704c04cdb79eae5cfe70c082 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 20:14:42 +0545 Subject: [PATCH 21/97] Create autoseen.js --- scripts/autoseen.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/autoseen.js diff --git a/scripts/autoseen.js b/scripts/autoseen.js new file mode 100644 index 0000000000..c1cf53aae7 --- /dev/null +++ b/scripts/autoseen.js @@ -0,0 +1,37 @@ +let autoseenEnabled = false; + +module.exports = { + config: { + name: "autoseen", + version: "1.0", + author: "hedroxyy", + countDown: 15, + role: 0, + shortDescription: "Toggle autoseen feature on or off", + longDescription: "Enable or disable the autoseen feature which marks all messages as read automatically.", + category: "owner", + guide: { + en: "{pn} on/off" + } + }, + + onStart: async function ({ api, message, args }) { + const subCommand = args[0]; + + if (subCommand === "on") { + autoseenEnabled = true; + message.reply("โœ… | Autoseen feature has been enabled."); + } else if (subCommand === "off") { + autoseenEnabled = false; + message.reply("โœ… | Autoseen feature has been disabled."); + } else { + message.reply("Usage: {pn} on/off"); + } + }, + + onChat: async function ({ api }) { + if (autoseenEnabled) { + api.markAsReadAll(); + } + } +}; From 87ca2a112a939a04357f389b6c3a308a16e8b2bb Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 20:16:51 +0545 Subject: [PATCH 22/97] Create autoseen.js --- scripts/cmds/autoseen.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/cmds/autoseen.js diff --git a/scripts/cmds/autoseen.js b/scripts/cmds/autoseen.js new file mode 100644 index 0000000000..c1cf53aae7 --- /dev/null +++ b/scripts/cmds/autoseen.js @@ -0,0 +1,37 @@ +let autoseenEnabled = false; + +module.exports = { + config: { + name: "autoseen", + version: "1.0", + author: "hedroxyy", + countDown: 15, + role: 0, + shortDescription: "Toggle autoseen feature on or off", + longDescription: "Enable or disable the autoseen feature which marks all messages as read automatically.", + category: "owner", + guide: { + en: "{pn} on/off" + } + }, + + onStart: async function ({ api, message, args }) { + const subCommand = args[0]; + + if (subCommand === "on") { + autoseenEnabled = true; + message.reply("โœ… | Autoseen feature has been enabled."); + } else if (subCommand === "off") { + autoseenEnabled = false; + message.reply("โœ… | Autoseen feature has been disabled."); + } else { + message.reply("Usage: {pn} on/off"); + } + }, + + onChat: async function ({ api }) { + if (autoseenEnabled) { + api.markAsReadAll(); + } + } +}; From aaf15b967ff8ce36a51e9e573832493cfeba86f3 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 20:18:48 +0545 Subject: [PATCH 23/97] Create anistatus.js --- scripts/cmds/anistatus.js | 87 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 scripts/cmds/anistatus.js diff --git a/scripts/cmds/anistatus.js b/scripts/cmds/anistatus.js new file mode 100644 index 0000000000..0ee6d53f04 --- /dev/null +++ b/scripts/cmds/anistatus.js @@ -0,0 +1,87 @@ +const axios = require("axios"); +const fs = require("fs-extra"); + + +module.exports = { + + threadStates: {}, + + config: { + name: 'anistatus', + aliases: ['as'], + version: '1.0', + author: 'HeDroxyy', + countDown: 5, + role: 0, + shortDescription: 'anime status', + longDescription: '', + category: 'media', + guide: { + en: '{p}{n}', + } + }, + + + onStart: async function ({ api, event }) { + const threadID = event.threadID; + + if (!this.threadStates[threadID]) { + this.threadStates[threadID] = {}; + } + + try { + api.setMessageReaction("๐Ÿ•", event.messageID, (err) => {}, true); + + const apiUrl = "https://ani-status.vercel.app/kshitiz"; + const response = await axios.get(apiUrl); + + if (response.data.url) { + const tikTokUrl = response.data.url; + console.log(`TikTok Video URL: ${tikTokUrl}`); + + const lado = `https://tikdl-video.vercel.app/tiktok?url=${encodeURIComponent(tikTokUrl)}`; + const puti = await axios.get(lado); + + if (puti.data.videoUrl) { + const videoUrl = puti.data.videoUrl; + console.log(`Downloadable Video URL: ${videoUrl}`); + + const cacheFilePath = __dirname + `/cache/${Date.now()}.mp4`; + await this.downloadVideo(videoUrl, cacheFilePath); + + if (fs.existsSync(cacheFilePath)) { + await api.sendMessage({ + body: "Random anime status video.", + attachment: fs.createReadStream(cacheFilePath), + }, threadID, event.messageID); + + fs.unlinkSync(cacheFilePath); + } else { + api.sendMessage("Error downloading the video.", threadID); + } + } else { + api.sendMessage("Error fetching video URL.", threadID); + } + } else { + api.sendMessage("Error fetching data from external API.", threadID); + } + } catch (err) { + console.error(err); + api.sendMessage("An error occurred while processing the anistatus command.", threadID); + } + }, + + downloadVideo: async function (url, cacheFilePath) { + try { + const response = await axios({ + method: "GET", + url: url, + responseType: "arraybuffer" + }); + + fs.writeFileSync(cacheFilePath, Buffer.from(response.data, "utf-8")); + } catch (err) { + console.error(err); + } + }, +}; From 1f4ef3ddca2bc8ba0cf083ac72d8b8f13852a6d4 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 20:21:14 +0545 Subject: [PATCH 24/97] Create Imgbb.js --- scripts/cmds/Imgbb.js | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 scripts/cmds/Imgbb.js diff --git a/scripts/cmds/Imgbb.js b/scripts/cmds/Imgbb.js new file mode 100644 index 0000000000..7c7afaf325 --- /dev/null +++ b/scripts/cmds/Imgbb.js @@ -0,0 +1,48 @@ +const axios = require('axios'); +const FormData = require('form-data'); + +module.exports = { + config: { + name: "imgbb", + aliases: ["i"], + version: "1.0", + author: "hedroxyy", + countDown: 5, + role: 0, + shortDescription: { + en: "Converting an image to a convertible imgbb" + }, + longDescription: { + en: "Upload image to imgbb by replying to photo" + }, + category: "tools", + guide: { + en: "" + } + }, + + onStart: async function ({ api, event }) { + const imgbbApiKey = "1b4d99fa0c3195efe42ceb62670f2a25"; // Replace "YOUR_API_KEY_HERE" with your actual API key + const linkanh = event.messageReply?.attachments[0]?.url; + if (!linkanh) { + return api.sendMessage('Please reply to an image.', event.threadID, event.messageID); + } + + try { + const response = await axios.get(linkanh, { responseType: 'arraybuffer' }); + const formData = new FormData(); + formData.append('image', Buffer.from(response.data, 'binary'), { filename: 'image.png' }); + const res = await axios.post('https://api.imgbb.com/1/upload', formData, { + headers: formData.getHeaders(), + params: { + key: imgbbApiKey + } + }); + const imageLink = res.data.data.url; + return api.sendMessage(imageLink, event.threadID, event.messageID); + } catch (error) { + console.log(error); + return api.sendMessage('Failed to upload image to imgbb.', event.threadID, event.messageID); + } + } +}; From 672823a67e2c8220b0382601e51849cc3c70ff80 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 20:34:27 +0545 Subject: [PATCH 25/97] Update account.dev.txt --- account.dev.txt | 81 +++++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 36 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index 54fad6f71f..e8fabb496d 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -5,8 +5,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.611Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.244Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { "key": "vpd", @@ -14,8 +14,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { "key": "ps_n", @@ -23,8 +23,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { "key": "ps_l", @@ -32,8 +32,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { "key": "c_user", @@ -41,8 +41,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { "key": "xs", @@ -50,8 +50,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { "key": "datr", @@ -59,61 +59,70 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { - "key": "wd", - "value": "451x880", + "key": "fr", + "value": "0HHRhSKTfqNRm5yAT.AWU62n3ZkVPzjg7yefzAeP_AgRo.BmhMtW..AAA.0.0.BmhhXI.AWWm6Ut1CBY", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { - "key": "fr", - "value": "0HHRhSKTfqNRm5yAT.AWU62n3ZkVPzjg7yefzAeP_AgRo.BmhMtW..AAA.0.0.BmhhXI.AWWm6Ut1CBY", + "key": "locale", + "value": "en_US", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" + }, + { + "key": "m_page_voice", + "value": "61561685613021", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { - "key": "usida", - "value": "eyJ2ZXIiOjEsImlkIjoiQXNnM3FpdHI4NHExZiIsInRpbWUiOjE3MjAxMDExMjV9", + "key": "m_pixel_ratio", + "value": "1.594152808189392", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { - "key": "locale", - "value": "en_US", + "key": "wd", + "value": "452x880", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { "key": "fbl_st", - "value": "101423874%3BT%3A28668352", + "value": "101226206%3BT%3A28668408", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" }, { "key": "wl_cbv", - "value": "v2%3Bclient_version%3A2551%3Btimestamp%3A1720101146", + "value": "v2%3Bclient_version%3A2551%3Btimestamp%3A1720104521", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T13:52:33.612Z", - "lastAccessed": "2024-07-04T13:52:33.612Z" + "creation": "2024-07-04T14:48:52.245Z", + "lastAccessed": "2024-07-04T14:48:52.245Z" } ] From a8add8e62e08110f4f07f6de32fea42f9b79d620 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 20:37:21 +0545 Subject: [PATCH 26/97] Create npm-publish-github-packages.yml --- .../workflows/npm-publish-github-packages.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/npm-publish-github-packages.yml diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml new file mode 100644 index 0000000000..0f838d5bce --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -0,0 +1,36 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - run: npm ci + - run: npm test + + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 16 + registry-url: https://npm.pkg.github.com/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 3192b228c7bd310cf3495473822261bf06d48029 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 21:05:01 +0545 Subject: [PATCH 27/97] Create cmdstore.js --- scripts/cmds/cmdstore.js | 95 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 scripts/cmds/cmdstore.js diff --git a/scripts/cmds/cmdstore.js b/scripts/cmds/cmdstore.js new file mode 100644 index 0000000000..6e57f3c560 --- /dev/null +++ b/scripts/cmds/cmdstore.js @@ -0,0 +1,95 @@ +.cmd install cmdstore.js const axios = require("axios"); + +module.exports = { + config: { + name: 'cmdstore', + version: '1.0', + author: 'Vex_Kshitiz', + role: 0, + shortDescription: 'store of cmds', + longDescription: 'store of cmds all made by kshitiz', + category: 'utility', + guide: { + en: 'To view commands: {p}cmdstore\nTo paginate: {p}cmdstore {page}\nTo search: {p}cmdstore {search}' + } + }, + + onStart: async function ({ api, event, args, message }) { + try { + let page = 1; + let searchQuery = ""; + + if (args.length === 1 && !isNaN(parseInt(args[0]))) { + page = parseInt(args[0]); + } else if (args.length === 1 && typeof args[0] === 'string') { + searchQuery = args[0]; + } else if (args.length === 2 && args[0] === 'search' && typeof args[1] === 'string') { + searchQuery = args[1]; + } + + const response = await axios.get("https://cmd-store.vercel.app/kshitiz"); + const commands = response.data; + + let filteredCommands = commands; + if (searchQuery) { + filteredCommands = commands.filter(cmd => cmd.cmdName.toLowerCase().includes(searchQuery.toLowerCase())); + } + + const startIndex = (page - 1) * 10; + const endIndex = page * 10; + const paginatedCommands = filteredCommands.slice(startIndex, endIndex); + + let replyMessage = ""; + paginatedCommands.forEach(cmd => { + replyMessage += ` + ๐—œ๐——:${cmd.id} + ๐—–๐— ๐——:${cmd.cmdName} + ๐—–๐—ข๐——๐—˜:${cmd.codeLink} + ๐—œ๐—ก๐—™๐—ข:${cmd.description} + ----------------------------------------------`; + }); + + if (replyMessage === "") { + replyMessage = "No commands found."; + } + + message.reply(replyMessage, (err, info) => { + global.GoatBot.onReply.set(info.messageID, { + commandName: "cmdstore", + messageID: info.messageID, + author: event.senderID, + commands, + }); + }); + } catch (error) { + console.error(error); + message.reply("An error occurred while fetching commands."); + } + }, + + onReply: async function ({ api, event, Reply, args, message }) { + const { author, commandName, commands } = Reply; + + if (event.senderID !== author || !commands) { + return; + } + + const commandID = parseInt(args[0], 10); + + if (isNaN(commandID) || !commands.some(cmd => cmd.id === commandID)) { + message.reply("Invalid input.\nPlease provide a valid command ID."); + return; + } + + const selectedCommand = commands.find(cmd => cmd.id === commandID); + + let replyMessage = ` + ๐—œ๐——:${selectedCommand.id} + ๐—–๐— ๐——:${selectedCommand.cmdName} + ๐—–๐—ข๐——๐—˜:${selectedCommand.codeLink} + ๐—œ๐—ก๐—™๐—ข:${selectedCommand.description}`; + + message.reply(replyMessage); + global.GoatBot.onReply.delete(event.messageID); + }, +}; From 624eef6b126f96da2b4b1581a2f5553b8755427a Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 21:06:34 +0545 Subject: [PATCH 28/97] Create spy.js --- scripts/cmds/spy.js | 66 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 scripts/cmds/spy.js diff --git a/scripts/cmds/spy.js b/scripts/cmds/spy.js new file mode 100644 index 0000000000..8d3cc088d3 --- /dev/null +++ b/scripts/cmds/spy.js @@ -0,0 +1,66 @@ +module.exports = { + config: { + name: "spy", + version: "1.0", + author: "Shikaki", + countDown: 60, + role: 0, + shortDescription: "Get user information and avatar", + longDescription: "Get user information and avatar by mentioning", + category: "image", + }, + + onStart: async function ({ event, message, usersData, api, args, getLang }) { + let avt; + const uid1 = event.senderID; + const uid2 = Object.keys(event.mentions)[0]; + let uid; + + if (args[0]) { + // Check if the argument is a numeric UID + if (/^\d+$/.test(args[0])) { + uid = args[0]; + } else { + // Check if the argument is a profile link + const match = args[0].match(/profile\.php\?id=(\d+)/); + if (match) { + uid = match[1]; + } + } + } + + if (!uid) { + // If no UID was extracted from the argument, use the default logic + uid = event.type === "message_reply" ? event.messageReply.senderID : uid2 || uid1; + } + + api.getUserInfo(uid, async (err, userInfo) => { + if (err) { + return message.reply("Failed to retrieve user information."); + } + + const avatarUrl = await usersData.getAvatarUrl(uid); + + // Gender mapping + let genderText; + switch (userInfo[uid].gender) { + case 1: + genderText = "Girl"; + break; + case 2: + genderText = "Boy"; + break; + default: + genderText = "Unknown"; + } + + // Construct and send the user's information with avatar + const userInformation = `โ Name: ${userInfo[uid].name}\nโ Profile URL: ${userInfo[uid].profileUrl}\nโ Gender: ${genderText}\nโ User Type: ${userInfo[uid].type}\nโ Is Friend: ${userInfo[uid].isFriend ? "Yes" : "No"}\nโ Is Birthday today: ${userInfo[uid].isBirthday ? "Yes" : "No"}`; + + message.reply({ + body: userInformation, + attachment: await global.utils.getStreamFromURL(avatarUrl) + }); + }); + } +}; From 383af68452501b73b91bffb8ac87579d84204cdf Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 21:20:24 +0545 Subject: [PATCH 29/97] Update handlerAction.js --- bot/handler/handlerAction.js | 133 ++++++++++++++++++++--------------- 1 file changed, 76 insertions(+), 57 deletions(-) diff --git a/bot/handler/handlerAction.js b/bot/handler/handlerAction.js index 13f33bb0d4..fda7f4ec0a 100644 --- a/bot/handler/handlerAction.js +++ b/bot/handler/handlerAction.js @@ -1,67 +1,86 @@ const createFuncMessage = global.utils.message; const handlerCheckDB = require("./handlerCheckData.js"); -module.exports = (api, threadModel, userModel, dashBoardModel, globalModel, usersData, threadsData, dashBoardData, globalData) => { - const handlerEvents = require(process.env.NODE_ENV == 'development' ? "./handlerEvents.dev.js" : "./handlerEvents.js")(api, threadModel, userModel, dashBoardModel, globalModel, usersData, threadsData, dashBoardData, globalData); +const request = require("request"); +const axios = require("axios"); +const fs = require("fs-extra"); - return async function (event) { - // Check if the bot is in the inbox and anti inbox is enabled - if ( - global.GoatBot.config.antiInbox == true && - (event.senderID == event.threadID || event.userID == event.senderID || event.isGroup == false) && - (event.senderID || event.userID || event.isGroup == false) - ) - return; +module.exports = (api, threadModel, userModel, dashBoardModel, globalModel, usersData, threadsData, dashBoardData, globalData) => { + const handlerEvents = require(process.env.NODE_ENV == 'development' ? "./handlerEvents.dev.js" : "./handlerEvents.js")(api, threadModel, userModel, dashBoardModel, globalModel, usersData, threadsData, dashBoardData, globalData); - const message = createFuncMessage(api, event); + return async function (event) { + const message = createFuncMessage(api, event); - await handlerCheckDB(usersData, threadsData, event); - const handlerChat = await handlerEvents(event, message); - if (!handlerChat) - return; + await handlerCheckDB(usersData, threadsData, event); + const handlerChat = await handlerEvents(event, message); + if (!handlerChat) + return; - const { - onAnyEvent, onFirstChat, onStart, onChat, - onReply, onEvent, handlerEvent, onReaction, - typ, presence, read_receipt - } = handlerChat; + const { onStart, onChat, onReply, onEvent, handlerEvent, onReaction, typ, presence, read_receipt } = handlerChat; + switch (event.type) { + case "message": + case "message_reply": + case "message_unsend": + if (onChat) onChat(); + if (onStart) onStart(); + if (onReply) onReply(); + if (event.type === "message_unsend") { + let resend = await threadsData.get(event.threadID, "settings.reSend"); + if (resend === true && event.senderID !== api.getCurrentUserID()) { + let umid = global.reSend[event.threadID].findIndex(e => e.messageID === event.messageID); - onAnyEvent(); - switch (event.type) { - case "message": - case "message_reply": - case "message_unsend": - onFirstChat(); - onChat(); - onStart(); - onReply(); - break; - case "event": - handlerEvent(); - onEvent(); - break; - case "message_reaction": - onReaction(); - break; - case "typ": - typ(); - break; - case "presence": - presence(); - break; - case "read_receipt": - read_receipt(); - break; - // case "friend_request_received": - // { /* code block */ } - // break; + if (umid > -1) { + let nname = await usersData.getName(event.senderID); + let attch = []; + if (global.reSend[event.threadID][umid].attachments.length > 0) { + let cn = 0; + for (const abc of global.reSend[event.threadID][umid].attachments) { + if (abc.type === "audio") { + cn += 1; + let pts = `scripts/cmds/tmp/${cn}.mp3`; + let res2 = (await axios.get(abc.url, { responseType: "arraybuffer" })).data; + fs.writeFileSync(pts, Buffer.from(res2, "utf-8")); + attch.push(fs.createReadStream(pts)); + } else { + attch.push(await global.utils.getStreamFromURL(abc.url)); + } + } + } - // case "friend_request_cancel" - // { /* code block */ } - // break; - default: - break; - } - }; -}; \ No newline at end of file + api.sendMessage({ + body: `${nname} removed:\n\n${global.reSend[event.threadID][umid].body}`, + mentions: [{ id: event.senderID, tag: nname }], + attachment: attch + }, event.threadID); + } + } + } + break; + case "event": + if (handlerEvent) handlerEvent(); + if (onEvent) onEvent(); + break; + case "message_reaction": + if (onReaction) onReaction(); + if (event.reaction === "๐Ÿ˜ ") { + // Unsend the message instead of removing the user from the group + api.unsendMessage(event.messageID, (err) => { + if (err) return console.log(err); + }); + } + break; + case "typ": + if (typ) typ(); + break; + case "presence": + if (presence) presence(); + break; + case "read_receipt": + if (read_receipt) read_receipt(); + break; + default: + break; + } + }; +}; From e20e96aa87ff027769ac93472efd5e6d72d0b99d Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 21:59:33 +0545 Subject: [PATCH 30/97] Update account.dev.txt --- account.dev.txt | 60 ++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index e8fabb496d..8debd216d5 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -5,8 +5,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.244Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.190Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "vpd", @@ -14,8 +14,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "ps_n", @@ -23,8 +23,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "ps_l", @@ -32,8 +32,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "c_user", @@ -41,8 +41,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "xs", @@ -50,8 +50,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "datr", @@ -59,8 +59,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "fr", @@ -68,8 +68,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "locale", @@ -77,8 +77,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "m_page_voice", @@ -86,8 +86,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "m_pixel_ratio", @@ -95,8 +95,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "wd", @@ -104,25 +104,25 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "fbl_st", - "value": "101226206%3BT%3A28668408", + "value": "101221547%3BT%3A28668493", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" }, { "key": "wl_cbv", - "value": "v2%3Bclient_version%3A2551%3Btimestamp%3A1720104521", + "value": "v2%3Bclient_version%3A2551%3Btimestamp%3A1720109637", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T14:48:52.245Z", - "lastAccessed": "2024-07-04T14:48:52.245Z" + "creation": "2024-07-04T16:14:02.191Z", + "lastAccessed": "2024-07-04T16:14:02.191Z" } ] From e9bfff8080cb972309592949dbfff2b2e4e951d3 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 22:15:45 +0545 Subject: [PATCH 31/97] Delete scripts/autoseen.js --- scripts/autoseen.js | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 scripts/autoseen.js diff --git a/scripts/autoseen.js b/scripts/autoseen.js deleted file mode 100644 index c1cf53aae7..0000000000 --- a/scripts/autoseen.js +++ /dev/null @@ -1,37 +0,0 @@ -let autoseenEnabled = false; - -module.exports = { - config: { - name: "autoseen", - version: "1.0", - author: "hedroxyy", - countDown: 15, - role: 0, - shortDescription: "Toggle autoseen feature on or off", - longDescription: "Enable or disable the autoseen feature which marks all messages as read automatically.", - category: "owner", - guide: { - en: "{pn} on/off" - } - }, - - onStart: async function ({ api, message, args }) { - const subCommand = args[0]; - - if (subCommand === "on") { - autoseenEnabled = true; - message.reply("โœ… | Autoseen feature has been enabled."); - } else if (subCommand === "off") { - autoseenEnabled = false; - message.reply("โœ… | Autoseen feature has been disabled."); - } else { - message.reply("Usage: {pn} on/off"); - } - }, - - onChat: async function ({ api }) { - if (autoseenEnabled) { - api.markAsReadAll(); - } - } -}; From f6d8303e28e2f79d32bb5e75fea481bf6a372d51 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Thu, 4 Jul 2024 22:18:08 +0545 Subject: [PATCH 32/97] Create play.js --- scripts/cmds/play.js | 98 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 scripts/cmds/play.js diff --git a/scripts/cmds/play.js b/scripts/cmds/play.js new file mode 100644 index 0000000000..f9916257eb --- /dev/null +++ b/scripts/cmds/play.js @@ -0,0 +1,98 @@ +const fs = require("fs-extra"); +const ytdl = require("@neoxr/ytdl-core"); +const yts = require("yt-search"); +const axios = require('axios'); +const tinyurl = require('tinyurl'); + +module.exports = { + config: { + name: "play", + version: "1.4", + author: "hedroxyy", + countDown: 5, + role: 0, + category: "media", + }, + + onStart: async function ({ api, event, message }) { + try { + let query = ''; + + + if (event.type === "message_reply" && ["audio", "video"].includes(event.messageReply.attachments[0].type)) { + const attachmentUrl = event.messageReply.attachments[0].url; + + + const transcription = await extractTextFromAudio(attachmentUrl); + + + query = transcription.split('\n')[0]; + } else { + + const input = event.body; + const data = input.split(" "); + + if (data.length < 2) { + return message.reply("Please put a song"); + } + + data.shift(); + query = data.join(" "); + } + + + const originalMessage = await message.reply(`Searching for "${query}"...`); + const searchResults = await yts(query); + + if (!searchResults.videos.length) { + return message.reply("Error: Song not found."); + } + + const video = searchResults.videos[0]; + const videoUrl = video.url; + const stream = ytdl(videoUrl, { filter: "audioonly" }); + const fileName = `music.mp3`; + const filePath = `${__dirname}/tmp/${fileName}`; + + stream.pipe(fs.createWriteStream(filePath)); + + stream.on('response', () => { + console.info('[DOWNLOADER]', 'Starting download now!'); + }); + + stream.on('info', (info) => { + console.info('[DOWNLOADER]', `Downloading ${info.videoDetails.title} by ${info.videoDetails.author.name}`); + }); + + stream.on('end', async () => { + console.info('[DOWNLOADER] Downloaded'); + if (fs.statSync(filePath).size > 26214400) { + fs.unlinkSync(filePath); + return message.reply('[ERR] The file could not be sent because it is larger than 25MB.'); + } + const replyMessage = { + body: `๐Ÿ’—`, + attachment: fs.createReadStream(filePath), + }; + await api.unsendMessage(originalMessage.messageID); + await message.reply(replyMessage, event.threadID, () => { + fs.unlinkSync(filePath); + }); + }); + } catch (error) { + console.error('[ERROR]', error); + message.reply("An error occurred while processing the request."); + } + }, +}; + + +async function extractTextFromAudio(audioUrl) { + try { + const response = await axios.get(`https://milanbhandari.onrender.com/transcribe?url=${encodeURIComponent(audioUrl)}`); + return response.data.transcript || ''; + } catch (error) { + console.error('[ERROR]', error); + return ''; + } +} From 0d2fbee29fd1673052d18742c069bd82e5168c29 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 08:39:50 +0545 Subject: [PATCH 33/97] Update account.dev.txt --- account.dev.txt | 60 ++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index 8debd216d5..8dcb5fb8a8 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -5,8 +5,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.190Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.773Z", + "lastAccessed": "2024-07-05T02:54:20.774Z" }, { "key": "vpd", @@ -14,8 +14,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.774Z", + "lastAccessed": "2024-07-05T02:54:20.774Z" }, { "key": "ps_n", @@ -23,8 +23,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.774Z", + "lastAccessed": "2024-07-05T02:54:20.774Z" }, { "key": "ps_l", @@ -32,8 +32,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.774Z", + "lastAccessed": "2024-07-05T02:54:20.774Z" }, { "key": "c_user", @@ -41,8 +41,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.774Z", + "lastAccessed": "2024-07-05T02:54:20.774Z" }, { "key": "xs", @@ -50,8 +50,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.774Z", + "lastAccessed": "2024-07-05T02:54:20.774Z" }, { "key": "datr", @@ -59,8 +59,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.774Z", + "lastAccessed": "2024-07-05T02:54:20.774Z" }, { "key": "fr", @@ -68,8 +68,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.774Z", + "lastAccessed": "2024-07-05T02:54:20.774Z" }, { "key": "locale", @@ -77,8 +77,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.774Z", + "lastAccessed": "2024-07-05T02:54:20.774Z" }, { "key": "m_page_voice", @@ -86,8 +86,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.775Z", + "lastAccessed": "2024-07-05T02:54:20.775Z" }, { "key": "m_pixel_ratio", @@ -95,8 +95,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.775Z", + "lastAccessed": "2024-07-05T02:54:20.775Z" }, { "key": "wd", @@ -104,25 +104,25 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.775Z", + "lastAccessed": "2024-07-05T02:54:20.775Z" }, { "key": "fbl_st", - "value": "101221547%3BT%3A28668493", + "value": "101024751%3BT%3A28669134", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.775Z", + "lastAccessed": "2024-07-05T02:54:20.775Z" }, { "key": "wl_cbv", - "value": "v2%3Bclient_version%3A2551%3Btimestamp%3A1720109637", + "value": "v2%3Bclient_version%3A2551%3Btimestamp%3A1720148051", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-04T16:14:02.191Z", - "lastAccessed": "2024-07-04T16:14:02.191Z" + "creation": "2024-07-05T02:54:20.775Z", + "lastAccessed": "2024-07-05T02:54:20.775Z" } ] From ecd94e9ad4e97d9ecb6806af36a8cc4dd577b1f0 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 08:56:16 +0545 Subject: [PATCH 34/97] Create autolink.js --- scripts/cmds/autolink.js | 462 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 462 insertions(+) create mode 100644 scripts/cmds/autolink.js diff --git a/scripts/cmds/autolink.js b/scripts/cmds/autolink.js new file mode 100644 index 0000000000..7ba4c35bd9 --- /dev/null +++ b/scripts/cmds/autolink.js @@ -0,0 +1,462 @@ +const fs = require("fs-extra"); +const axios = require("axios"); +const cheerio = require("cheerio"); +const qs = require("qs"); +const { getStreamFromURL, shortenURL, randomString } = global.utils; + +function loadAutoLinkStates() { + try { + const data = fs.readFileSync("autolink.json", "utf8"); + return JSON.parse(data); + } catch (err) { + return {}; + } +} + +function saveAutoLinkStates(states) { + fs.writeFileSync("autolink.json", JSON.stringify(states, null, 2)); +} + +let autoLinkStates = loadAutoLinkStates(); + +module.exports = { + threadStates: {}, + config: { + name: 'autolink', + version: '4.0', + author: 'Vex_Kshitiz', + countDown: 5, + role: 0, + shortDescription: 'Auto video downloader for Instagram, Facebook, TikTok, Twitter, Pinterest and YouTube', + longDescription: '', + category: 'media', + guide: { + en: '{p}{n}', + } + }, + onStart: async function ({ api, event }) { + const threadID = event.threadID; + + if (!autoLinkStates[threadID]) { + autoLinkStates[threadID] = 'on'; + saveAutoLinkStates(autoLinkStates); + } + + if (!this.threadStates[threadID]) { + this.threadStates[threadID] = {}; + } + + if (event.body.toLowerCase().includes('autolink off')) { + autoLinkStates[threadID] = 'off'; + saveAutoLinkStates(autoLinkStates); + api.sendMessage("AutoLink is now turned off for this chat.", event.threadID, event.messageID); + } else if (event.body.toLowerCase().includes('autolink on')) { + autoLinkStates[threadID] = 'on'; + saveAutoLinkStates(autoLinkStates); + api.sendMessage("AutoLink is now turned on for this chat.", event.threadID, event.messageID); + } + }, + onChat: async function ({ api, event }) { + const threadID = event.threadID; + + if (this.checkLink(event.body)) { + const { url } = this.checkLink(event.body); + console.log(`Attempting to download from URL: ${url}`); + if (autoLinkStates[threadID] === 'on' || !autoLinkStates[threadID]) { + this.downLoad(url, api, event); + } else { + api.sendMessage("", event.threadID, event.messageID); + } + api.setMessageReaction("๐Ÿ•", event.messageID, (err) => {}, true); + } + }, + downLoad: async function (url, api, event) { + const startTime = Date.now(); + const path = __dirname + `/cache/${startTime}.mp4`; + + let estimatedTime = ''; + let videoUrl = ''; + + try { + if (url.includes("instagram")) { + videoUrl = await this.downloadInstagram(url, api, event, path); + } else if (url.includes("facebook") || url.includes("fb.watch")) { + videoUrl = await this.downloadFacebook(url, api, event, path); + } else if (url.includes("tiktok")) { + videoUrl = await this.downloadTikTok(url, api, event, path); + } else if (url.includes("x.com")) { + videoUrl = await this.downloadTwitter(url, api, event, path); + } else if (url.includes("pin.it")) { + videoUrl = await this.downloadPinterest(url, api, event, path); + } else if (url.includes("youtu")) { + videoUrl = await this.downloadYouTube(url, api, event, path); + } + + const endTime = Date.now(); + estimatedTime = ((endTime - startTime) / 1000).toFixed(2) + ' seconds'; + } catch (err) { + console.error(err); + api.sendMessage("An error occurred while processing your request.", event.threadID, event.messageID); + return; + } + + api.sendMessage(`It Would Probably Take : ${estimatedTime}`, event.threadID, event.messageID); + }, + downloadInstagram: async function (url, api, event, path) { + const startTime = Date.now(); + const res = await this.getLink(url, api, event, path); + const response = await axios({ + method: "GET", + url: res, + responseType: "arraybuffer" + }); + fs.writeFileSync(path, Buffer.from(response.data, "utf-8")); + const endTime = Date.now(); + console.log(`Instagram download completed in ${(endTime - startTime) / 1000} seconds`); + + if (fs.statSync(path).size / 1024 / 1024 > 25) { + api.sendMessage("The file is too large, cannot be sent", event.threadID, () => fs.unlinkSync(path), event.messageID); + } else { + const shortUrl = await shortenURL(res); + const messageBody = `โœ… ๐Ÿ”— Download Url: ${shortUrl}`; + + api.sendMessage({ + body: messageBody, + attachment: fs.createReadStream(path) + }, event.threadID, () => fs.unlinkSync(path), event.messageID); + } + + return res; + }, + downloadFacebook: async function (url, api, event, path) { + const startTime = Date.now(); + const res = await fbDownloader(url); + if (res.success && res.download && res.download.length > 0) { + const videoUrl = res.download[0].url; + const response = await axios({ + method: "GET", + url: videoUrl, + responseType: "stream" + }); + if (response.headers['content-length'] > 87031808) { + api.sendMessage("The file is too large, cannot be sent", event.threadID, () => fs.unlinkSync(path), event.messageID); + } else { + response.data.pipe(fs.createWriteStream(path)); + response.data.on('end', async () => { + const shortUrl = await shortenURL(videoUrl); + const messageBody = `โœ…๐Ÿ”— Download Url: ${shortUrl}`; + + api.sendMessage({ + body: messageBody, + attachment: fs.createReadStream(path) + }, event.threadID, () => fs.unlinkSync(path), event.messageID); + }); + } + } else { + api.sendMessage("", event.threadID, event.messageID); + } + const endTime = Date.now(); + console.log(`Facebook download completed in ${(endTime - startTime) / 1000} seconds`); + + return res.download[0].url; + }, + downloadTikTok: async function (url, api, event, path) { + const startTime = Date.now(); + const res = await axios.get(`https://tikdl-video.vercel.app/tiktok?url=${encodeURIComponent(url)}`); + if (res.data.videoUrl) { + const videoUrl = res.data.videoUrl; + const response = await axios({ + method: "GET", + url: videoUrl, + responseType: "stream" + }); + if (response.headers['content-length'] > 87031808) { + api.sendMessage("The file is too large, cannot be sent", event.threadID, () => fs.unlinkSync(path), event.messageID); + } else { + response.data.pipe(fs.createWriteStream(path)); + response.data.on('end', async () => { + const shortUrl = await shortenURL(videoUrl); + const messageBody = `โœ…๐Ÿ”— Download Url: ${shortUrl}`; + + api.sendMessage({ + body: messageBody, + attachment: fs.createReadStream(path) + }, event.threadID, () => fs.unlinkSync(path), event.messageID); + }); + } + } else { + api.sendMessage("", event.threadID, event.messageID); + } + const endTime = Date.now(); + console.log(`TikTok download completed in ${(endTime - startTime) / 1000} seconds`); + + return res.data.videoUrl; + }, + downloadTwitter: async function (url, api, event, path) { + const startTime = Date.now(); + const res = await axios.get(`https://xdl-twitter.vercel.app/kshitiz?url=${encodeURIComponent(url)}`); + const videoUrl = res.data.videoUrl; + + const response = await axios({ + method: "GET", + url: videoUrl, + responseType: "stream" + }); + + if (response.headers['content-length'] > 87031808) { + api.sendMessage("The file is too large, cannot be sent", event.threadID, () => fs.unlinkSync(path), event.messageID); + } else { + response.data.pipe(fs.createWriteStream(path)); + response.data.on('end', async () => { + const shortUrl = await shortenURL(videoUrl); + const messageBody = `โœ…๐Ÿ”— Download Url: ${shortUrl}`; + + api.sendMessage({ + body: messageBody, + attachment: fs.createReadStream(path) + }, event.threadID, () => fs.unlinkSync(path), event.messageID); + }); + } + const endTime = Date.now(); + console.log(`Twitter download completed in ${(endTime - startTime) / 1000} seconds`); + + return videoUrl; + }, + downloadPinterest: async function (url, api, event, path) { + const startTime = Date.now(); + const res = await axios.get(`https://pindl-pinterest.vercel.app/kshitiz?url=${encodeURIComponent(url)}`); + const videoUrl = res.data.url; + + const response = await axios({ + method: "GET", + url: videoUrl, + responseType: "stream" + }); + + if (response.headers['content-length'] > 87031808) { + api.sendMessage("The file is too large, cannot be sent", event.threadID, () => fs.unlinkSync(path), event.messageID); + } else { + response.data.pipe(fs.createWriteStream(path)); + response.data.on('end', async () => { + const shortUrl = await shortenURL(videoUrl); + const messageBody = `โœ…๐Ÿ”— Download Url: ${shortUrl}`; + + api.sendMessage({ + body: messageBody, + attachment: fs.createReadStream(path) + }, event.threadID, () => fs.unlinkSync(path), event.messageID); + }); + } + const endTime = Date.now(); + console.log(`Pinterest download completed in ${(endTime - startTime) / 1000} seconds`); + + return videoUrl; + }, + downloadYouTube: async function (url, api, event, path) { + const startTime = Date.now(); + const res = await axios.get(`https://yt-downloader-eta.vercel.app/kshitiz?url=${encodeURIComponent(url)}`); + const videoUrl = res.data.url; + + const response = await axios({ + method: "GET", + url: videoUrl, + responseType: "stream" + }); + + if (response.headers['content-length'] > 87031808) { + api.sendMessage("The file is too large, cannot be sent", event.threadID, () => fs.unlinkSync(path), event.messageID); + } else { + response.data.pipe(fs.createWriteStream(path)); + response.data.on('end', async () => { + const shortUrl = await shortenURL(videoUrl); + const messageBody = `โœ…๐Ÿ”— Download Url: ${shortUrl}`; + + api.sendMessage({ + body: messageBody, + attachment: fs.createReadStream(path) + }, event.threadID, () => fs.unlinkSync(path), event.messageID); + }); + } + const endTime = Date.now(); + console.log(`YouTube download completed in ${(endTime - startTime) / 1000} seconds`); + + return videoUrl; + }, + getLink: function (url, api, event, path) { + return new Promise((resolve, reject) => { + if (url.includes("instagram")) { + axios({ + method: "GET", + url: `https://insta-kshitiz.vercel.app/insta?url=${encodeURIComponent(url)}` + }) + .then(res => { + console.log(`API Response: ${JSON.stringify(res.data)}`); + if (res.data.url) { + resolve(res.data.url); + } else { + reject(new Error("Invalid response from the API")); + } + }) + .catch(err => reject(err)); + } else if (url.includes("facebook") || url.includes("fb.watch")) { + fbDownloader(url).then(res => { + if (res.success && res.download && res.download.length > 0) { + const videoUrl = res.download[0].url; + resolve(videoUrl); + } else { + reject(new Error("Invalid response from the Facebook downloader")); + } + }).catch(err => reject(err)); + } else if (url.includes("tiktok")) { + axios.get(`https://tikdl-video.vercel.app/tiktok?url=${encodeURIComponent(url)}`) + .then(res => { + if (res.data.videoUrl) { + resolve(res.data.videoUrl); + } else { + reject(new Error("Invalid response from the TikTok API")); + } + }) + .catch(err => reject(err)); + } else { + reject(new Error("Unsupported platform. Only Instagram, Facebook, and TikTok are supported.")); + } + }); + }, + queryTikTok: async function (url) { + try { + const res = await axios.get("https://ssstik.io/en"); + const s_tt = res.data.split('s_tt = ')[1].split(',')[0]; + const { data: result } = await axios({ + url: "https://ssstik.io/abc?url=dl", + method: "POST", + data: qs.stringify({ + id: url, + locale: 'en', + tt: s_tt + }), + headers: { + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.33" + } + }); + + const $ = cheerio.load(result); + if (result.includes('
')) { + throw { + status: "error", + message: $('p').text() + }; + } + + const allUrls = $('.result_overlay_buttons > a'); + const format = { + status: 'success', + title: $('.maintext').text() + }; + + const slide = $(".slide"); + if (slide.length !== 0) { + const url = []; + slide.each((index, element) => { + url.push($(element).attr('href')); + }); + format.downloadUrls = url; + return format; + } + + format.downloadUrls = $(allUrls[0]).attr('href'); + return format; + } catch (err) { + console.error('Error in TikTok Downloader:', err); + return { + status: "error", + message: "An error occurred while downloading from TikTok" + }; + } + }, + checkLink: function (url) { + if ( + url.includes("instagram") || + url.includes("facebook") || + url.includes("fb.watch") || + url.includes("tiktok") || + url.includes("x.com") || + url.includes("pin.it") || + url.includes("youtu") + ) { + return { + url: url + }; + } + + const fbWatchRegex = /fb\.watch\/[a-zA-Z0-9_-]+/i; + if (fbWatchRegex.test(url)) { + return { + url: url + }; + } + + return null; + } +}; + +async function fbDownloader(url) { + try { + const response1 = await axios({ + method: 'POST', + url: 'https://snapsave.app/action.php?lang=vn', + headers: { + "accept": "*/*", + "accept-language": "vi,en-US;q=0.9,en;q=0.8", + "content-type": "multipart/form-data", + "sec-ch-ua": "\"Chromium\";v=\"110\", \"Not A(Brand\";v=\"24\", \"Microsoft Edge\";v=\"110\"", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "\"Windows\"", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-origin", + "Referer": "https://snapsave.app/vn", + "Referrer-Policy": "strict-origin-when-cross-origin" + }, + data: { + url + } + }); + + console.log('Facebook Downloader Response:', response1.data); + + let html; + const evalCode = response1.data.replace('return decodeURIComponent', 'html = decodeURIComponent'); + eval(evalCode); + html = html.split('innerHTML = "')[1].split('";\n')[0].replace(/\\"/g, '"'); + + const $ = cheerio.load(html); + const download = []; + + const tbody = $('table').find('tbody'); + const trs = tbody.find('tr'); + + trs.each(function (i, elem) { + const trElement = $(elem); + const tds = trElement.children(); + const quality = $(tds[0]).text().trim(); + const url = $(tds[2]).children('a').attr('href'); + if (url != undefined) { + download.push({ + quality, + url + }); + } + }); + + return { + success: true, + video_length: $("div.clearfix > p").text().trim(), + download + }; + } catch (err) { + console.error('Error in Facebook Downloader:', err); + return { + success: false + }; + } +} From 6f47bc2bd6010085fcbb30230d7b59b8553e52d3 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 09:10:11 +0545 Subject: [PATCH 35/97] Delete scripts/cmds/Imgbb.js --- scripts/cmds/Imgbb.js | 48 ------------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 scripts/cmds/Imgbb.js diff --git a/scripts/cmds/Imgbb.js b/scripts/cmds/Imgbb.js deleted file mode 100644 index 7c7afaf325..0000000000 --- a/scripts/cmds/Imgbb.js +++ /dev/null @@ -1,48 +0,0 @@ -const axios = require('axios'); -const FormData = require('form-data'); - -module.exports = { - config: { - name: "imgbb", - aliases: ["i"], - version: "1.0", - author: "hedroxyy", - countDown: 5, - role: 0, - shortDescription: { - en: "Converting an image to a convertible imgbb" - }, - longDescription: { - en: "Upload image to imgbb by replying to photo" - }, - category: "tools", - guide: { - en: "" - } - }, - - onStart: async function ({ api, event }) { - const imgbbApiKey = "1b4d99fa0c3195efe42ceb62670f2a25"; // Replace "YOUR_API_KEY_HERE" with your actual API key - const linkanh = event.messageReply?.attachments[0]?.url; - if (!linkanh) { - return api.sendMessage('Please reply to an image.', event.threadID, event.messageID); - } - - try { - const response = await axios.get(linkanh, { responseType: 'arraybuffer' }); - const formData = new FormData(); - formData.append('image', Buffer.from(response.data, 'binary'), { filename: 'image.png' }); - const res = await axios.post('https://api.imgbb.com/1/upload', formData, { - headers: formData.getHeaders(), - params: { - key: imgbbApiKey - } - }); - const imageLink = res.data.data.url; - return api.sendMessage(imageLink, event.threadID, event.messageID); - } catch (error) { - console.log(error); - return api.sendMessage('Failed to upload image to imgbb.', event.threadID, event.messageID); - } - } -}; From 59ef93ef8cae9a594001f58caf5046c3eaf8bc4b Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 09:10:30 +0545 Subject: [PATCH 36/97] Create imgbb.js --- scripts/cmds/imgbb.js | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 scripts/cmds/imgbb.js diff --git a/scripts/cmds/imgbb.js b/scripts/cmds/imgbb.js new file mode 100644 index 0000000000..7c7afaf325 --- /dev/null +++ b/scripts/cmds/imgbb.js @@ -0,0 +1,48 @@ +const axios = require('axios'); +const FormData = require('form-data'); + +module.exports = { + config: { + name: "imgbb", + aliases: ["i"], + version: "1.0", + author: "hedroxyy", + countDown: 5, + role: 0, + shortDescription: { + en: "Converting an image to a convertible imgbb" + }, + longDescription: { + en: "Upload image to imgbb by replying to photo" + }, + category: "tools", + guide: { + en: "" + } + }, + + onStart: async function ({ api, event }) { + const imgbbApiKey = "1b4d99fa0c3195efe42ceb62670f2a25"; // Replace "YOUR_API_KEY_HERE" with your actual API key + const linkanh = event.messageReply?.attachments[0]?.url; + if (!linkanh) { + return api.sendMessage('Please reply to an image.', event.threadID, event.messageID); + } + + try { + const response = await axios.get(linkanh, { responseType: 'arraybuffer' }); + const formData = new FormData(); + formData.append('image', Buffer.from(response.data, 'binary'), { filename: 'image.png' }); + const res = await axios.post('https://api.imgbb.com/1/upload', formData, { + headers: formData.getHeaders(), + params: { + key: imgbbApiKey + } + }); + const imageLink = res.data.data.url; + return api.sendMessage(imageLink, event.threadID, event.messageID); + } catch (error) { + console.log(error); + return api.sendMessage('Failed to upload image to imgbb.', event.threadID, event.messageID); + } + } +}; From add1a7c6cddab7d600437b81484ee87de68dcea9 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 09:12:53 +0545 Subject: [PATCH 37/97] Update war.js --- scripts/cmds/war.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmds/war.js b/scripts/cmds/war.js index 29d5d2e048..767ad6e8ac 100644 --- a/scripts/cmds/war.js +++ b/scripts/cmds/war.js @@ -2,7 +2,7 @@ module.exports = { config: { name: "war", version: "1.0", - author: "Xemon", + author: "hedroxyy", role: 2, category: "texts", guide: { From 91fab86cab0f5c18c39a1dad7bba827ece3b5de4 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 09:28:48 +0545 Subject: [PATCH 38/97] Update war.js --- scripts/cmds/war.js | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/scripts/cmds/war.js b/scripts/cmds/war.js index 767ad6e8ac..98d35d34c4 100644 --- a/scripts/cmds/war.js +++ b/scripts/cmds/war.js @@ -53,7 +53,31 @@ module.exports = { setTimeout(() => { a({ body: "TEORO AMAA LAAII KOPCHI MAA LAGERW CHIKAAMM RANNDDII MAKAA BAXHHA๐Ÿ˜ญ๐Ÿ’‹ " + name, mentions: arraytag }); }, 500); // Reduced delay between messages to 500 milliseconds - }, 1000); // Reduced interval duration to 1000 milliseconds + setTimeout(() => { + a({ body: "TERO AAMA KO SIL TUTNEY GARII CHODNA NA PAROSSS MUJII KHATEYYY GAWAAARR ๐Ÿ˜‚๐Ÿ’ฆ" + name, mentions: arraytag }); + }, 1000); // Additional message after 1000 milliseconds + setTimeout(() => { + a({ body: "MUJI GAREEEB KO BACCHA SALLA XAKKAAA MUJIII AUKAT LESSSS EKSIKKO AUKAT NA BHAKO BUNU ๐Ÿ˜‚๐Ÿ’‹ " + name, mentions: arraytag }); + }, 1500); // Additional message after 1500 milliseconds + setTimeout(() => { + a({ body: "TA MUJII KTA SAMAJ MAH KASARI AAYIS TEI SOCHI RAXUHH MUJII PUTI BHAKO MANXEYY YAAA PUTI FLEX HANNA NA AAIJO ๐Ÿ˜‚๐Ÿ’‹ " + name, mentions: arraytag }); + }, 2000); // Additional message after 2000 milliseconds + setTimeout(() => { + a({ body: "SALA GAWARR TERO JASTO TW MERO BHUTRA SAMAN HOOO JHAT HARU MUJI 2 3 CLASS MAH DNEY FUCCHA FUCHHI BAU SANGA NEU KHOJXA ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ’‹ " + name, mentions: arraytag }); + }, 2500); // Additional message after 2500 milliseconds + setTimeout(() => { + a({ body: "GAWARR KHATEYYY KOO XOROO MUJII TAILET LADOO CHUSNA BAHEK K GAREKO XASS HMM MUJII ? ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ’‹ KHATEYY SALLA JAAA GAYERW BLOUSE LAGAYERW GHUMMM ๐Ÿ˜‚๐Ÿ‘Œ " + name, mentions: arraytag }); + }, 3000); // Additional message after 3000 milliseconds + setTimeout(() => { + a({ body: "MUJI THAMEL KO MAAAL SALA GAWARRR KO NASOOOOO AUKAT LESSS TERO CHAK MAH MERO LADO KO JHATYARO HANNU PARNEY BELA BHAYO ๐Ÿ˜‚๐Ÿ‘Œ " + name, mentions: arraytag }); + }, 3500); // Additional message after 3500 milliseconds + setTimeout(() => { + a({ body: "HEER BABU TW MUJI KO AUKAT XAINA BUJHIS AHILEY TESAILEY BHANDAI XUH MUJI AAFNO PUTI FLX NA HAAAN CHIKNA TIME LAGAUDANA ๐Ÿ˜‚๐Ÿ‘Œ" + name, mentions: arraytag }); + }, 4000); // Additional message after 4000 milliseconds + setTimeout(() => { + a({ body: "SALA RATNA PARK KOO MAAAL MUJI TERO RATE KATI HO BHANTWWW ? MUJII PUTI FLEX HANDAI HIDXAS RANDI KAAA BAAAN ๐Ÿ˜‚๐Ÿ˜‚๐Ÿ‘Œ " + name, mentions: arraytag }); + }, 4500); // Additional message after 4500 milliseconds + }, 5000); // Adjusted interval duration to 5000 milliseconds to accommodate all messages } else if (!userData.warMode) { return api.sendMessage("War Mode is currently deactivated.", event.threadID); } else { From 5e96b78ed485883980a3e3350aac52a892354302 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 13:29:45 +0545 Subject: [PATCH 39/97] Create delete.js --- scripts/cmds/delete.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 scripts/cmds/delete.js diff --git a/scripts/cmds/delete.js b/scripts/cmds/delete.js new file mode 100644 index 0000000000..a1bf89ad3b --- /dev/null +++ b/scripts/cmds/delete.js @@ -0,0 +1,40 @@ +const fs = require('fs'); +const path = require('path'); + +module.exports = { + config: { + name: "delete", + aliases: ["del"], + version: "1.0", + author: "hedroxyy", + countDown: 5, + role: 2, + shortDescription: "Delete file and folders", + longDescription: "Delete file", + category: "owner", + guide: "{pn}" + }, + + onStart: async function ({ args, message, event }) { + const commandName = args[0]; + + if (!commandName) { + return message.reply("Type the file name.."); + } + + const fileNameWithExtension = commandName.endsWith('.js') ? commandName : commandName + '.js'; + const filePath = path.join(__dirname, '..', 'cmds', fileNameWithExtension); + + try { + if (fs.existsSync(filePath)) { + fs.unlinkSync(filePath); + message.reply("โœ… | " + fileNameWithExtension + " Successfully Removed !!"); + } else { + message.reply("Command file " + fileNameWithExtension + " unavailable!!"); + } + } catch (err) { + console.error(err); + message.reply("Cannot be deleted because " + fileNameWithExtension + ": " + err.message); + } + } +}; From 8352072963a141e5559b5971ed83452c489ad6ff Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 13:36:41 +0545 Subject: [PATCH 40/97] Update cmdstore.js --- scripts/cmds/cmdstore.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/cmds/cmdstore.js b/scripts/cmds/cmdstore.js index 6e57f3c560..b56f1c6d42 100644 --- a/scripts/cmds/cmdstore.js +++ b/scripts/cmds/cmdstore.js @@ -1,9 +1,10 @@ -.cmd install cmdstore.js const axios = require("axios"); +const axios = require("axios"); module.exports = { config: { name: 'cmdstore', version: '1.0', + aliases: ["cs"], author: 'Vex_Kshitiz', role: 0, shortDescription: 'store of cmds', From 468c5f6bcd15f4352b3da029f1ea086a1e5fff3e Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 13:42:51 +0545 Subject: [PATCH 41/97] Create anime.js --- scripts/cmds/anime.js | 213 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 213 insertions(+) create mode 100644 scripts/cmds/anime.js diff --git a/scripts/cmds/anime.js b/scripts/cmds/anime.js new file mode 100644 index 0000000000..7aade2ddaa --- /dev/null +++ b/scripts/cmds/anime.js @@ -0,0 +1,213 @@ +const { getStreamFromURL } = global.utils; +const axios = require("axios"); + +const API = 'https://anime-api.shahadat2006hh.workers.dev'; +const URL_SHORTENER_API = 'https://url6-9.onrender.com'; +const API_KEY = 'rehat-gay'; + +module.exports = { + config: { + name: "anime", + aliases: ["anime"], + version: "1.0", + author: "shahadat20066", + countDown: 5, + role: 0, + shortDescription: "Get anime data", + longDescription: "Search and get anime info", + category: "anime", + guide: { + en: "{pn} popular\n{pn} search \n\nExample:\n{pn} popular\n{pn} search Naruto" + } + }, + + onStart: async function ({ message, args, event }) { + if (args.length === 0) { + return message.reply(`โš  | Please enter a command!`); + } + + const command = args[0]; + const query = args.slice(1).join(" "); + + try { + if (command.toLowerCase() === 'popular') { + const res = await axios.get(`${API}/gogoPopular/1`); + const animeList = res.data.results.slice(0, 6); + + if (animeList.length === 0) { + return message.reply(`๐Ÿฅบ Not Found`); + } + + let replyText = "===ใ€Œ Popular Anime ใ€===\n\nReply the number which anime info you want to see\n\n"; + for (let i = 0; i < animeList.length; i++) { + const anime = animeList[i]; + replyText += `${i + 1}. ๐Ÿ”ฐ Title: ${anime.title}\n ๐Ÿ—“๏ธ ${anime.releaseDate}\n\n`; + } + + const form = { + body: replyText, + attachment: await Promise.all(animeList.map(anime => getStreamFromURL(anime.image))) + }; + + message.reply(form, async (err, info) => { + if (!err) { + global.GoatBot.onReply.set(info.messageID, { + commandName: this.config.name, + messageID: info.messageID, + author: event.senderID, + type: 'searchResults', + data: animeList + }); + } + }); + + } else if (command.toLowerCase() === 'search') { + if (!query) { + return message.reply(`โš  | Please enter anime name to search!`); + } + + const res = await axios.get(`${API}/search/${query}`); + const animeList = res.data.results.slice(0, 6); + + if (animeList.length === 0) { + return message.reply(`๐Ÿฅบ Not Found`); + } + + let replyText = `===ใ€Œ Anime search result for: ${query} ใ€===\n\nReply the number which anime info you want to see\n\n`; + for (let i = 0; i < animeList.length; i++) { + const anime = animeList[i]; + replyText += `${i + 1}. ๐Ÿ”ฐ Title: ${anime.title}\n ๐Ÿ—“๏ธ ${anime.releaseDate}\n\n`; + } + + const form = { + body: replyText, + attachment: await Promise.all(animeList.map(anime => getStreamFromURL(anime.img))) + }; + + message.reply(form, async (err, info) => { + if (!err) { + global.GoatBot.onReply.set(info.messageID, { + commandName: this.config.name, + messageID: info.messageID, + author: event.senderID, + type: 'searchResults', + data: animeList + }); + } + }); + + } else { + return message.reply(`โš  | Invalid command!`); + } + + } catch (e) { + message.reply(`๐Ÿฅบ Not Found`); + console.error(e.message); + } + }, + + onReply: async function ({ message, event, Reply, args }) { + const { author, type, data, animeId, totalEp } = Reply; + if (event.senderID !== author) return; + + const selectedIndex = parseInt(args[0], 10) - 1; + if (isNaN(selectedIndex) || selectedIndex < 0 || selectedIndex >= data.length) { + return message.reply(`โš  | Invalid selection!`); + } + + const selectedAnime = data[selectedIndex]; + + try { + if (type === 'searchResults') { + const res = await axios.get(`${API}/anime/${selectedAnime.id}`); + const animeInfo = res.data.results; + const episodes = animeInfo.episodes; + + let replyText = `===ใ€Œ Anime Info ใ€===\n\n๐Ÿ”ฐ Name: ${animeInfo.name}\n๐Ÿ†Ž Type: ${animeInfo.type}\n๐ŸŽญ Genre: ${animeInfo.genre}\n๐Ÿ“… Release: ${animeInfo.released}\n๐Ÿ“Š Status: ${animeInfo.status}\n๐Ÿ”  Other name: ${animeInfo.other_name}\n๐Ÿ“– Total Episodes: ${episodes.length}\n๐Ÿ—’ ๏ธPlot summary: ${animeInfo.plot_summary}\n\n(Reply the episode number which episode you want to get the download links.)`; + + const form = { + body: replyText, + attachment: await getStreamFromURL(animeInfo.image) + }; + + message.reply(form, async (err, info) => { + if (!err) { + global.GoatBot.onReply.set(info.messageID, { + commandName: this.config.name, + messageID: info.messageID, + author: event.senderID, + type: 'animeInfo', + data: episodes, + animeId: selectedAnime.id, + totalEp: episodes.length, + infoImg: animeInfo.image + }); + } + }); + + } else if (type === 'animeInfo') { + const episodeNumber = parseInt(args[0], 10); + if (isNaN(episodeNumber) || episodeNumber < 1 || episodeNumber > totalEp) { + return message.reply(`โš  | Please enter a valid episode number!`); + } + + const episodeId = `${animeId}-episode-${episodeNumber}`; + + const res = await axios.get(`${API}/download/${episodeId}`); + const downloadLinks = res.data.results; + + let replyText = `Here is your episode ${episodeNumber} download link senpai\n\n(Reply the episode number on the previous message which episode you want to get the download links again)\n\n`; + const qualities = ['640x360', '854x480', '1280x720', '1920x1080']; + + for (const quality of qualities) { + if (downloadLinks[quality]) { + const url = downloadLinks[quality]; + const shortRes = await axios.get(`${URL_SHORTENER_API}/?url=${encodeURIComponent(url)}&apikey=${API_KEY}`); + replyText += `${quality}: ${shortRes.data.shortUrl}\n\n`; + } + } + + message.reply(replyText, async (err, info) => { + if (!err) { + global.GoatBot.onReply.set(info.messageID, { + commandName: this.config.name, + messageID: info.messageID, + author: event.senderID, + type: 'downloadLinks', + data: downloadLinks, + animeId: animeId, + totalEp: totalEp + }); + } + }); + } + } catch (e) { + message.reply(`๐Ÿฅบ An error occurred`); + console.error(e.message); + } + } +}; + +async function search(query) { + const url = `${API}/search/${query}`; + const response = await axios.get(url); + return response.data; +}; + +async function getInfo(id) { + const url = `${API}/anime/${id}`; + const response = await axios.get(url); + return response.data; +}; + +async function watch(id) { + const url = `${API}/episode/${id}`; + const response = await axios.get(url); + return response.data; +} + +async function download(id) { + const url = `${API}/download/${id}`; + const response = await axios.get(url); + return response.data; +} From a7da3cc537f446cbc77f61aa228530bd3c1cec10 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 13:45:02 +0545 Subject: [PATCH 42/97] Create gcadmin.js --- scripts/cmds/gcadmin.js | 74 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 scripts/cmds/gcadmin.js diff --git a/scripts/cmds/gcadmin.js b/scripts/cmds/gcadmin.js new file mode 100644 index 0000000000..30be5a6da8 --- /dev/null +++ b/scripts/cmds/gcadmin.js @@ -0,0 +1,74 @@ +module.exports = { + config: { + name: "gcadmin", + aliases: ['groupadmin', 'admingc', 'admingroup'], + version: "1.0", + author: "hedroxyy", + countDown: 5, + role: 1, + shortDescription: "gc admin management", + longDescription: "gc admin management", + category: "box", + guide: { + en: "{p}{n} add @mention / remove @mention", + } + }, + + onStart: async function ({ api, event, args }) { + const command = args[0]; + const target = args.slice(1).join(" "); + const threadID = event.threadID; + + switch (command) { + case "add": + await addAdmin(api, event, threadID, target); + break; + case "remove": + await removeAdmin(api, event, threadID, target); + break; + default: + api.sendMessage("Invalid command! Usage: " + this.config.guide.en, threadID); + } + } +}; + +async function addAdmin(api, event, threadID, target) { + try { + const userID = await resolveUserID(api, event, target); + await api.changeAdminStatus(threadID, userID, true); + api.sendMessage(`Added ${target} as admin.`, threadID); + } catch (error) { + console.error("Error adding admin:", error); + api.sendMessage("Failed to add user as admin.", threadID); + } +} + +async function removeAdmin(api, event, threadID, target) { + try { + const userID = await resolveUserID(api, event, target); + await api.changeAdminStatus(threadID, userID, false); + api.sendMessage(`Removed ${target} from admin position.`, threadID); + } catch (error) { + console.error("Error removing admin:", error); + api.sendMessage("Failed to remove user from admin position.", threadID); + } +} + +async function resolveUserID(api, event, target) { + let userID; + if (target.startsWith('@')) { + const { mentions } = event; + for (const mentionID in mentions) { + if (mentions[mentionID].replace("@", "") === target.slice(1)) { + userID = mentionID; + break; + } + } + if (!userID) { + throw new Error("User not found!"); + } + } else { + userID = target; + } + return userID; +} From ec0bdd16d3e3b9e7d9bdd4873deffa9d260051d7 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 13:46:36 +0545 Subject: [PATCH 43/97] Create hentailist.js --- scripts/cmds/hentailist.js | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 scripts/cmds/hentailist.js diff --git a/scripts/cmds/hentailist.js b/scripts/cmds/hentailist.js new file mode 100644 index 0000000000..774faa5a16 --- /dev/null +++ b/scripts/cmds/hentailist.js @@ -0,0 +1,52 @@ +const axios = require('axios'); + +module.exports = { + config: { + name: "hentailist", + version: "1.0", + author: "gpt", + role: 2, + aliases: ["hl", "hlist"], + category: "18+", + description: "Shows a list of random top-rated hentai", + guide: { + vi: "Khรดng cรณ sแบตn", + en: "Usage: .hentailist" + } + }, + + onStart: async function (context) { + const { api, event } = context; + const threadID = event.threadID; + const messageID = event.messageID; + + api.setMessageReaction('๐Ÿ’—', messageID, (err) => { + if (err) console.error(err); + }); + + try { + // Fetch top-rated hentai from NHentai + const response = await axios.get('https://nhentai.net/api/galleries/search?query=popular'); + const results = response.data.result; + + // Get a random selection of 5 top-rated hentai + const randomHentai = results.sort(() => 0.5 - Math.random()).slice(0, 5); + + if (randomHentai.length === 0) { + api.sendMessage("No hentai found.", threadID, messageID); + return; + } + + let message = '๐Ÿ”ž Top Rated Hentai ๐Ÿ”ž\n\n'; + randomHentai.forEach((hentai, index) => { + message += `${index + 1}. ${hentai.title.english || hentai.title.japanese || hentai.title.pretty}\n`; + message += `Link: https://nhentai.net/g/${hentai.id}\n\n`; + }); + + api.sendMessage(message, threadID, messageID); + } catch (error) { + console.error(error); + api.sendMessage("Failed to fetch hentai list. Please try again later.", threadID, messageID); + } + } +}; From 870bbffe7089e396c3b6192e4bbb7a8bfba2f589 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 14:11:53 +0545 Subject: [PATCH 44/97] Create info.js --- scripts/cmds/info.js | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 scripts/cmds/info.js diff --git a/scripts/cmds/info.js b/scripts/cmds/info.js new file mode 100644 index 0000000000..5a18b12d69 --- /dev/null +++ b/scripts/cmds/info.js @@ -0,0 +1,59 @@ +const fs = require('fs'); +const moment = require('moment-timezone'); + +module.exports = { + config: { + name: "info", + version: "1.3", + author: "hedroxyy", + countDown: 5, + role: 0, + shortDescription: { + vi: "", + en: "Sends information about the bot and admin along with an image." + }, + longDescription: { + vi: "", + en: "Sends information about the bot and admin along with an image." + }, + category: "utility", + guide: { + en: "{pn}" + }, + envConfig: {} + }, + + onStart: async function ({ message }) { + const botName = "HeDroxuu ๐Ÿ’—"; + const botPrefix = "."; + const authorName = "@HeDroxyy"; + const authorFB = "https://www.facebook.com/profile.php?id=61559819588542"; + const authorInsta = "hedroxyyy_"; + + const link = 'https://i.ibb.co/p4bJTXD/image.jpg'; // Directly using the provided image URL + + // Get current date and time in Asia/Kathmandu timezone + const now = moment().tz('Asia/Kathmandu'); + const date = now.format('MMMM Do YYYY'); + const time = now.format('h:mm:ss A'); + + // Calculate bot uptime + const uptime = process.uptime(); + const seconds = Math.floor(uptime % 60); + const minutes = Math.floor((uptime / 60) % 60); + const hours = Math.floor((uptime / (60 * 60)) % 24); + const days = Math.floor(uptime / (60 * 60 * 24)); + const uptimeString = `${hours}hrs: ${minutes}min: ${seconds}sec`; + + message.reply({ + body: `>> Bot Name: ${botName}\n>> Bot Prefix: ${botPrefix}\n>> AuthorName: ${authorName}\n>> FB: ${authorFB}\n>> Insta: ${authorInsta}`, + attachment: await global.utils.getStreamFromURL(link) + }); + }, + + onChat: async function({ event, message, getLang }) { + if (event.body && event.body.toLowerCase() === "info") { + this.onStart({ message }); + } + } +}; From 2e4490fd192c563f21c9d1cd0af947daf97c9a68 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 14:22:59 +0545 Subject: [PATCH 45/97] Update info.js --- scripts/cmds/info.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cmds/info.js b/scripts/cmds/info.js index 5a18b12d69..9c660b31a5 100644 --- a/scripts/cmds/info.js +++ b/scripts/cmds/info.js @@ -26,9 +26,9 @@ module.exports = { onStart: async function ({ message }) { const botName = "HeDroxuu ๐Ÿ’—"; const botPrefix = "."; - const authorName = "@HeDroxyy"; + const authorName = "HeDroxyy DaDa"; const authorFB = "https://www.facebook.com/profile.php?id=61559819588542"; - const authorInsta = "hedroxyyy_"; + const authorInsta = "https://www.instagram.com/hedroxyyy_?igsh=MWw5MzNydmtiN3l0OQ=="; const link = 'https://i.ibb.co/p4bJTXD/image.jpg'; // Directly using the provided image URL @@ -46,7 +46,7 @@ module.exports = { const uptimeString = `${hours}hrs: ${minutes}min: ${seconds}sec`; message.reply({ - body: `>> Bot Name: ${botName}\n>> Bot Prefix: ${botPrefix}\n>> AuthorName: ${authorName}\n>> FB: ${authorFB}\n>> Insta: ${authorInsta}`, + body: `-----------------------------\nAUTHOR_NAME: ${authorName}\n-----------------------------\nBOT NAME: ${botName}\nBOT PREFIX: ${botPrefix}\n-----------------------------\nFACEBOOK: ${authorFB}\nINSTA: ${authorInsta}\n-----------------------------`, attachment: await global.utils.getStreamFromURL(link) }); }, From a44707cb6e81ce835fb9ba24348147b0f70483b1 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 14:27:40 +0545 Subject: [PATCH 46/97] Update weather.js --- scripts/cmds/weather.js | 159 +++++++++++----------------------------- 1 file changed, 41 insertions(+), 118 deletions(-) diff --git a/scripts/cmds/weather.js b/scripts/cmds/weather.js index 9be3e6f4ca..a1f3f2486c 100644 --- a/scripts/cmds/weather.js +++ b/scripts/cmds/weather.js @@ -1,123 +1,46 @@ -const axios = require("axios"); -const moment = require("moment-timezone"); -const Canvas = require("canvas"); -const fs = require("fs-extra"); +const axios = require('axios'); +const cheerio = require('cheerio'); -Canvas.registerFont( - __dirname + "/assets/font/BeVietnamPro-SemiBold.ttf", { - family: "BeVietnamPro-SemiBold" -}); -Canvas.registerFont( - __dirname + "/assets/font/BeVietnamPro-Regular.ttf", { - family: "BeVietnamPro-Regular" -}); +async function getWeather(location) { + const url = `https://www.google.com/search?q=weather+${location}`; + const headers = { "User-Agent": "Mozilla/5.0" }; -function convertFtoC(F) { - return Math.floor((F - 32) / 1.8); -} -function formatHours(hours) { - return moment(hours).tz("Asia/Ho_Chi_Minh").format("HH[h]mm[p]"); -} - -module.exports = { - config: { - name: "weather", - version: "1.2", - author: "NTKhang", - countDown: 5, - role: 0, - description: { - vi: "xem dแปฑ bรกo thแปi tiแบฟt hiแป‡n tแบกi vร  5 ngร y sau", - en: "view the current and next 5 days weather forecast" - }, - category: "other", - guide: { - vi: "{pn} <ฤ‘แป‹a ฤ‘iแปƒm>", - en: "{pn} " - }, - envGlobal: { - weatherApiKey: "d7e795ae6a0d44aaa8abb1a0a7ac19e4" - } - }, - - langs: { - vi: { - syntaxError: "Vui lรฒng nhแบญp ฤ‘แป‹a ฤ‘iแปƒm", - notFound: "Khรดng thแปƒ tรฌm thแบฅy ฤ‘แป‹a ฤ‘iแปƒm: %1", - error: "ฤรฃ xแบฃy ra lแป—i: %1", - today: "Thแปi tiแบฟt hรดm nay: %1\n%2\n๐ŸŒก Nhiแป‡t ฤ‘แป™ thแบฅp nhแบฅt - cao nhแบฅt %3ยฐC - %4ยฐC\n๐ŸŒก Nhiแป‡t ฤ‘แป™ cแบฃm nhแบญn ฤ‘ฦฐแปฃc %5ยฐC - %6ยฐC\n๐ŸŒ… Mแบทt trแปi mแปc %7\n๐ŸŒ„ Mแบทt trแปi lแบทn %8\n๐ŸŒƒ Mแบทt trฤƒng mแปc %9\n๐Ÿ™๏ธ Mแบทt trฤƒng lแบทn %10\n๐ŸŒž Ban ngร y: %11\n๐ŸŒ™ Ban ฤ‘รชm: %12" - }, - en: { - syntaxError: "Please enter a location", - notFound: "Location not found: %1", - error: "An error has occurred: %1", - today: "Today's weather: %1\n%2\n๐ŸŒก Low - high temperature %3ยฐC - %4ยฐC\n๐ŸŒก Feels like %5ยฐC - %6ยฐC\n๐ŸŒ… Sunrise %7\n๐ŸŒ„ Sunset %8\n๐ŸŒƒ Moonrise %9\n๐Ÿ™๏ธ Moonset %10\n๐ŸŒž Day: %11\n๐ŸŒ™ Night: %12" - } - }, - - onStart: async function ({ args, message, envGlobal, getLang }) { - const apikey = envGlobal.weatherApiKey; - - const area = args.join(" "); - if (!area) - return message.reply(getLang("syntaxError")); - let areaKey, dataWeather, areaName; - - try { - const response = (await axios.get(`https://api.accuweather.com/locations/v1/cities/search.json?q=${encodeURIComponent(area)}&apikey=${apikey}&language=vi-vn`)).data; - if (response.length == 0) - return message.reply(getLang("notFound", area)); - const data = response[0]; - areaKey = data.Key; - areaName = data.LocalizedName; - } - catch (err) { - return message.reply(getLang("error", err.response.data.Message)); - } + try { + const response = await axios.get(url, { headers }); + const html = response.data; + const $ = cheerio.load(html); - try { - dataWeather = (await axios.get(`http://api.accuweather.com/forecasts/v1/daily/10day/${areaKey}?apikey=${apikey}&details=true&language=vi`)).data; - } - catch (err) { - return message.reply(`โŒ ฤรฃ xแบฃy ra lแป—i: ${err.response.data.Message}`); - } + const weatherInfo = $(".BNeawe.iBp4i.AP7Wnd").first().text(); - const dataWeatherDaily = dataWeather.DailyForecasts; - const dataWeatherToday = dataWeatherDaily[0]; - const msg = getLang("today", areaName, dataWeather.Headline.Text, convertFtoC(dataWeatherToday.Temperature.Minimum.Value), convertFtoC(dataWeatherToday.Temperature.Maximum.Value), convertFtoC(dataWeatherToday.RealFeelTemperature.Minimum.Value), convertFtoC(dataWeatherToday.RealFeelTemperature.Maximum.Value), formatHours(dataWeatherToday.Sun.Rise), formatHours(dataWeatherToday.Sun.Set), formatHours(dataWeatherToday.Moon.Rise), formatHours(dataWeatherToday.Moon.Set), dataWeatherToday.Day.LongPhrase, dataWeatherToday.Night.LongPhrase); - - const bg = await Canvas.loadImage(__dirname + "/assets/image/bgWeather.jpg"); - const { width, height } = bg; - const canvas = Canvas.createCanvas(width, height); - const ctx = canvas.getContext("2d"); - ctx.drawImage(bg, 0, 0, width, height); - let X = 100; - ctx.fillStyle = "#ffffff"; - const data = dataWeather.DailyForecasts.slice(0, 7); - for (const item of data) { - const icon = await Canvas.loadImage("http://vortex.accuweather.com/adc2010/images/slate/icons/" + item.Day.Icon + ".svg"); - ctx.drawImage(icon, X, 210, 80, 80); - - ctx.font = "30px BeVietnamPro-SemiBold"; - const maxC = `${convertFtoC(item.Temperature.Maximum.Value)}ยฐC `; - ctx.fillText(maxC, X, 366); - - ctx.font = "30px BeVietnamPro-Regular"; - const minC = String(`${convertFtoC(item.Temperature.Minimum.Value)}ยฐC`); - const day = moment(item.Date).format("DD"); - ctx.fillText(minC, X, 445); - ctx.fillText(day, X + 20, 140); - - X += 135; - } - - const pathSaveImg = `${__dirname}/tmp/weather_${areaKey}.jpg`; - fs.writeFileSync(pathSaveImg, canvas.toBuffer()); - - return message.reply({ - body: msg, - attachment: fs.createReadStream(pathSaveImg) - }, () => fs.unlinkSync(pathSaveImg)); + return weatherInfo; + } catch (error) { + console.error("Error fetching weather data:", error); + return "Could not retrieve weather data"; + } +} - } -}; \ No newline at end of file +module.exports = { + config: { + name: "weather", + version: "1.0", + author: "Your Name", + role: 0, + category: "utility", + description: "Gets the weather information for a specified location.", + guide: { + vi: "Khรดng cรณ sแบตn", + en: "Usage: .weather {location}" + } + }, + + onStart: async function ({ bot, message, args }) { + if (args.length === 0) { + message.reply("Please provide a location."); + return; + } + + const location = args.join(" "); + const weatherInfo = await getWeather(location); + message.reply(`Weather in ${location}: ${weatherInfo}`); + } +}; From f79dc3bccce64cc0eecc1318adce0fcee3af69f5 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 14:44:42 +0545 Subject: [PATCH 47/97] Create gay.js --- scripts/cmds/gay.js | 116 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 scripts/cmds/gay.js diff --git a/scripts/cmds/gay.js b/scripts/cmds/gay.js new file mode 100644 index 0000000000..4a3b2533e2 --- /dev/null +++ b/scripts/cmds/gay.js @@ -0,0 +1,116 @@ +const DIG = require("discord-image-generation"); +const fs = require("fs-extra"); + +module.exports = { + config: { + name: "gay", + version: "1.0", + author: "@tas33n", + countDown: 1, + role: 0, + shortDescription: "find gay", + longDescription: "", + category: "box chat", + guide: "{pn} {{[on | off]}}", + envConfig: { + deltaNext: 5 + } + }, + + langs: { + vi: { + noTag: "Bแบกn phแบฃi tag ngฦฐแปi bแบกn muแป‘n tรกt" + }, + en: { + noTag: "You must tag the person you want to " + } + }, + + onStart: async function ({ event, message, usersData, args, getLang }) + { + + let mention = Object.keys(event.mentions) + let uid; + + // const img = await new DIG.Gay().getImage(url); + + + if(event.type == "message_reply"){ + uid = event.messageReply.senderID + } else{ + if (mention[0]){ + uid = mention[0] + }else{ + console.log(" jsjsj") + uid = event.senderID} + } + +let url = await usersData.getAvatarUrl(uid) +let avt = await new DIG.Gay().getImage(url) + + + // message.reply({ + // body:"", + // attachment: await global.utils.getStreamFromURL(avt) + // }) + const pathSave = `${__dirname}/tmp/gay.png`; + fs.writeFileSync(pathSave, Buffer.from(avt)); + let body = "look.... i found a gay" + if(!mention[0]) body="Baka you gay\nforgot to reply or mention someone" + message.reply({body:body, +attachment: fs.createReadStream(pathSave) + }, () => fs.unlinkSync(pathSave)); + + + } +}; + + + + + + + + + +// onStart: async function ({ message, event, usersData, threadsData, args }) { + + + + +// if(event.type == "message_reply"){ +// avt = await usersData.getAvatarUrl(event.messageReply.senderID) +// } else{ +// if (!uid2){avt = await usersData.getAvatarUrl(uid1) +// } else{avt = await usersData.getAvatarUrl(uid2)}} + + +// message.reply({body:"Look.... I found a gay", +// attachment: fs.createReadStream(pathSave) +// }, () => fs.unlinkSync(pathSave)); + + + + + +// message.send({body:"Look.... I found a gay", +// attachment: fs.createReadStream(pathSave) +// }, () => fs.unlinkSync(pathSave)); + +// st fs = require("fs-extra"); +// let url = await usersData.getAvatarUrl(event.messageReply.senderID) +// // const img = await new DIG.Gay().getImage(url); + // const pathSave = `${__dirname}/tmp/gay.png`; + // fs.writeFileSync(pathSave, Buffer.from(avt)); + +// // message.send({body:"Look.... I found a gay", +// // attachment: fs.createReadStream(pathSave) +// // }, () => fs.unlinkSync(pathSave)); + + +// } + + + + +// } From 96ef6bd5ce96fce74ea3c67e607547e4d9de9936 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 15:14:35 +0545 Subject: [PATCH 48/97] Create findgay.js --- scripts/cmds/findgay.js | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 scripts/cmds/findgay.js diff --git a/scripts/cmds/findgay.js b/scripts/cmds/findgay.js new file mode 100644 index 0000000000..010367173c --- /dev/null +++ b/scripts/cmds/findgay.js @@ -0,0 +1,65 @@ +const DIG = require("discord-image-generation"); +const fs = require("fs-extra"); + +module.exports = { + config: { + name: "findgay", + version: "1.0", + author: "@tas33n", + countDown: 1, + role: 0, + shortDescription: "find gay", + longDescription: "", + category: "box chat", + guide: "{pn} {{[on | off]}}", + envConfig: { + deltaNext: 5 + } + }, + + langs: { + vi: { + noTag: "Bแบกn phแบฃi chแปn ngฦฐแปi muแป‘n tรฌm (tag)" + }, + en: { + noTag: "You must choose who you want to find (tag)" + } + }, + + onStart: async function ({ api, event, message, usersData, args, getLang }) { + const { threadID, messageID, senderID } = event; + const { participantIDs } = await api.getThreadInfo(threadID); + const botID = api.getCurrentUserID(); + const listUserID = participantIDs.filter(ID => ID != botID); + + // Ensure there are at least two participants in the thread + if (listUserID.length < 2) { + return message.reply(getLang("noTag")); + } + + // Randomly select one member + let randomIndex = Math.floor(Math.random() * listUserID.length); + let uid = listUserID[randomIndex]; + + let url = await usersData.getAvatarUrl(uid); + let avt = await new DIG.Gay().getImage(url); + + const pathSave = `${__dirname}/tmp/gay.png`; + fs.writeFileSync(pathSave, Buffer.from(avt)); + + let memberName = (await usersData.get(uid)).name; // Get the name of the tagged member + + let body = `GOTCHA ๐Ÿณ๏ธโ€๐ŸŒˆ`; + + // Sending message with image + let msg = { + body: body, + mentions: [{ id: uid, tag: memberName }], + attachment: fs.createReadStream(pathSave) + }; + + message.reply(msg, () => { + fs.unlinkSync(pathSave); + }); + } +}; From ea2043909cb3d60d8998acb3cae41bd3722224a5 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 15:16:33 +0545 Subject: [PATCH 49/97] Update gay.js --- scripts/cmds/gay.js | 109 +++++++++++--------------------------------- 1 file changed, 26 insertions(+), 83 deletions(-) diff --git a/scripts/cmds/gay.js b/scripts/cmds/gay.js index 4a3b2533e2..a5e1418a93 100644 --- a/scripts/cmds/gay.js +++ b/scripts/cmds/gay.js @@ -26,91 +26,34 @@ module.exports = { } }, - onStart: async function ({ event, message, usersData, args, getLang }) - { - - let mention = Object.keys(event.mentions) - let uid; - - // const img = await new DIG.Gay().getImage(url); - - - if(event.type == "message_reply"){ - uid = event.messageReply.senderID - } else{ - if (mention[0]){ - uid = mention[0] - }else{ - console.log(" jsjsj") - uid = event.senderID} - } + onStart: async function ({ event, message, usersData, args, getLang }) { + let mention = Object.keys(event.mentions); + let uid; + + if (event.type == "message_reply") { + uid = event.messageReply.senderID; + } else { + if (mention[0]) { + uid = mention[0]; + } else { + console.log("No mention found"); + uid = event.senderID; + } + } -let url = await usersData.getAvatarUrl(uid) -let avt = await new DIG.Gay().getImage(url) + let url = await usersData.getAvatarUrl(uid); + let avt = await new DIG.Gay().getImage(url); + const pathSave = `${__dirname}/tmp/gay.png`; + fs.writeFileSync(pathSave, Buffer.from(avt)); + let body = "GAY FOUND ๐Ÿ’€๐Ÿณ๏ธโ€๐ŸŒˆ"; + if (!mention[0]) { + body = getLang("noTag"); + } - // message.reply({ - // body:"", - // attachment: await global.utils.getStreamFromURL(avt) - // }) - const pathSave = `${__dirname}/tmp/gay.png`; - fs.writeFileSync(pathSave, Buffer.from(avt)); - let body = "look.... i found a gay" - if(!mention[0]) body="Baka you gay\nforgot to reply or mention someone" - message.reply({body:body, -attachment: fs.createReadStream(pathSave) + message.reply({ + body: body, + attachment: fs.createReadStream(pathSave) }, () => fs.unlinkSync(pathSave)); - - - } + } }; - - - - - - - - - -// onStart: async function ({ message, event, usersData, threadsData, args }) { - - - - -// if(event.type == "message_reply"){ -// avt = await usersData.getAvatarUrl(event.messageReply.senderID) -// } else{ -// if (!uid2){avt = await usersData.getAvatarUrl(uid1) -// } else{avt = await usersData.getAvatarUrl(uid2)}} - - -// message.reply({body:"Look.... I found a gay", -// attachment: fs.createReadStream(pathSave) -// }, () => fs.unlinkSync(pathSave)); - - - - - -// message.send({body:"Look.... I found a gay", -// attachment: fs.createReadStream(pathSave) -// }, () => fs.unlinkSync(pathSave)); - -// st fs = require("fs-extra"); -// let url = await usersData.getAvatarUrl(event.messageReply.senderID) -// // const img = await new DIG.Gay().getImage(url); - // const pathSave = `${__dirname}/tmp/gay.png`; - // fs.writeFileSync(pathSave, Buffer.from(avt)); - -// // message.send({body:"Look.... I found a gay", -// // attachment: fs.createReadStream(pathSave) -// // }, () => fs.unlinkSync(pathSave)); - - -// } - - - - -// } From 95eb97ba41808d2f62ad0bf58cdd60f57f2e261d Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 17:42:23 +0545 Subject: [PATCH 50/97] Update leave.js --- scripts/cmds/leave.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmds/leave.js b/scripts/cmds/leave.js index 3aaf84f60f..e8b1647ab1 100644 --- a/scripts/cmds/leave.js +++ b/scripts/cmds/leave.js @@ -4,7 +4,7 @@ module.exports = { config: { name: "leave", version: "1.0", - author: "hedroxyy", + author: "Sandy", countDown: 5, role: 2, shortDescription: "Bot will leave a group chat", @@ -25,7 +25,7 @@ module.exports = { } try { - await api.sendMessage("Lw Chaldeko Xolna ๐Ÿ’ฆ", threadID); + await api.sendMessage("EKLOT XOLERW AAUXUH HAITA โ˜ ๏ธ๐Ÿ’ฆ", threadID); await api.removeUserFromGroup(api.getCurrentUserID(), threadID); console.log(`Left group chat: ${threadID}`); } catch (error) { From d9cc1226179462515dc4fd9a3565f20099ec591f Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 17:48:16 +0545 Subject: [PATCH 51/97] Update info.js --- scripts/cmds/info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmds/info.js b/scripts/cmds/info.js index 9c660b31a5..65d89ee811 100644 --- a/scripts/cmds/info.js +++ b/scripts/cmds/info.js @@ -16,7 +16,7 @@ module.exports = { vi: "", en: "Sends information about the bot and admin along with an image." }, - category: "utility", + category: "ADMIN", guide: { en: "{pn}" }, From edc1660f9ad23f74952977ab7e417db25ef26821 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 17:49:17 +0545 Subject: [PATCH 52/97] Update handlerAction.js --- bot/handler/handlerAction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/handler/handlerAction.js b/bot/handler/handlerAction.js index fda7f4ec0a..d40c372581 100644 --- a/bot/handler/handlerAction.js +++ b/bot/handler/handlerAction.js @@ -63,7 +63,7 @@ module.exports = (api, threadModel, userModel, dashBoardModel, globalModel, user break; case "message_reaction": if (onReaction) onReaction(); - if (event.reaction === "๐Ÿ˜ ") { + if (event.reaction === "๐Ÿ˜ก") { // Unsend the message instead of removing the user from the group api.unsendMessage(event.messageID, (err) => { if (err) return console.log(err); From f2e791a0c161219bfa3d8ffe558b0baa9a65a0f8 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 18:12:11 +0545 Subject: [PATCH 53/97] Create profilepicture.js --- scripts/cmds/profilepicture.js | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 scripts/cmds/profilepicture.js diff --git a/scripts/cmds/profilepicture.js b/scripts/cmds/profilepicture.js new file mode 100644 index 0000000000..6b417f327c --- /dev/null +++ b/scripts/cmds/profilepicture.js @@ -0,0 +1,39 @@ +module.exports = { + config: { + name: "pfp", + version: "1.0", + author: "Shikaki", + role: 0, + shortDescription: "Get user avatar", + longDescription: "Get user avatar by mentioning or UID", + category: "image", + }, + + onStart: async function ({ event, message, usersData, api, args, getLang }) { + let uid; + + if (args[0]) { + + if (/^\d+$/.test(args[0])) { + uid = args[0]; + } else { + + const match = args[0].match(/profile\.php\?id=(\d+)/); + if (match) { + uid = match[1]; + } + } + } + + if (!uid) { + + uid = event.type === "message_reply" ? event.messageReply.senderID : Object.keys(event.mentions)[0] || event.senderID; + } + + const avatarUrl = await usersData.getAvatarUrl(uid); + + message.reply({ + attachment: await global.utils.getStreamFromURL(avatarUrl) + }); + } +}; From 21552bbf8c0cc8cc26a1d1e5270a177f1fd81dac Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 18:13:03 +0545 Subject: [PATCH 54/97] Update profilepicture.js --- scripts/cmds/profilepicture.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/cmds/profilepicture.js b/scripts/cmds/profilepicture.js index 6b417f327c..fa8e8e1e59 100644 --- a/scripts/cmds/profilepicture.js +++ b/scripts/cmds/profilepicture.js @@ -1,6 +1,7 @@ module.exports = { config: { - name: "pfp", + name: "profilepicture", + aliases: ["pfp"], version: "1.0", author: "Shikaki", role: 0, From 63c0c7d9cc9628372ced51b7be8453c7db1864b8 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 18:44:30 +0545 Subject: [PATCH 55/97] Create gmage.js --- scripts/cmds/gmage.js | 85 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 scripts/cmds/gmage.js diff --git a/scripts/cmds/gmage.js b/scripts/cmds/gmage.js new file mode 100644 index 0000000000..ebb7b1ef16 --- /dev/null +++ b/scripts/cmds/gmage.js @@ -0,0 +1,85 @@ +const path = require('path'); +const fs = require('fs-extra'); +const axios = require('axios'); + +module.exports = { + config: { + name: 'gmage', + version: '1.4', + author: 'Cruizex', + category: 'Utility', + shortDescription: 'Search Google Images and send attachments.', + longDescription: 'Usage: -gmage ', + }, + + onStart: async function ({ api, event, args }) { + try { + const searchQuery = args.join(' '); + const apiKey = 'AIzaSyDO33bwnu3Jc_HPLpR1GKH-bg8WbNPyJaE'; + const searchEngineID = 'a11473c13288f413e'; + + const response = await axios.get('https://www.googleapis.com/customsearch/v1', { + params: { + key: apiKey, + cx: searchEngineID, + q: searchQuery, + searchType: 'image', + }, + }); + + const images = response.data.items.slice(0, 3); // Limit to the first 3 images + + const imgData = []; + let imagesDownloaded = 0; + + for (const image of images) { + const imageUrl = image.link; + + try { + const imageResponse = await axios.head(imageUrl); // Attempt to check if the image URL is valid + + // Check if the response headers indicate a valid image + if (imageResponse.headers['content-type'].startsWith('image/')) { + const response = await axios({ + method: 'get', + url: imageUrl, + responseType: 'stream', + }); + + const outputFileName = path.join(__dirname, 'cache', `downloaded_image_${imgData.length + 1}.png`); + const writer = fs.createWriteStream(outputFileName); + + response.data.pipe(writer); + + await new Promise((resolve, reject) => { + writer.on('finish', resolve); + writer.on('error', reject); + }); + + imgData.push(fs.createReadStream(outputFileName)); + imagesDownloaded++; + } else { + console.error(`Invalid image (${imageUrl}): Content type is not recognized as an image.`); + } + } catch (error) { + console.error(`Error downloading image (${imageUrl}):`, error); + // Skip the current image if there's an error + continue; + } + } + + if (imagesDownloaded > 0) { + // Send only non-bad images as attachments + api.sendMessage({ attachment: imgData }, event.threadID, event.messageID); + + // Remove local copies + imgData.forEach((img) => fs.remove(img.path)); + } else { + api.sendMessage('No valid images found.', event.threadID, event.messageID); + } + } catch (error) { + console.error(error); + return api.sendMessage('An error occurred.', event.threadID, event.messageID); + } + }, +}; From 76164774803895ec53a870ed1dcc6b4128bef1ec Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 18:59:01 +0545 Subject: [PATCH 56/97] Create dalle.js --- scripts/cmds/dalle.js | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 scripts/cmds/dalle.js diff --git a/scripts/cmds/dalle.js b/scripts/cmds/dalle.js new file mode 100644 index 0000000000..b26ac2e0fd --- /dev/null +++ b/scripts/cmds/dalle.js @@ -0,0 +1,50 @@ +const axios = require("axios"); +const fs = require("fs-extra"); +const path = require("path"); +const KievRPSSecAuth = "FABiBBRaTOJILtFsMkpLVWSG6AN6C/svRwNmAAAEgAAACB7XzbV/L0yBIASeHjI15Ymz3cZkIYmaOIqyGPpPayuC6p8qVTsKI2cccUit00w2ZzCDVr6Pw2+I4H7cMXIWv2M1nWNjBIbkpsZG3L4j5ZNqcvrrcWKlUvAIjGefFfsYQEj0LN1FiAv5LmvNe+FnZXoaVJN1sDK2b89QvRSmaOknIT3PLiE+pyiNjYmGsWAjFJF/Dn7cUNAHtLrewg4ejVqPlEP+g3G+VwLZwYDVk0TazTeu3VK0OA8DB/0/QMXDmccJE3zf8zvCeccUjEpLrIHgfb4NSXfbbIewiba3bx3+HBml8sAJIXDaqA5i324dBjMYowIRJvGeHI5S5kvYsK0a2E8JsQqhHkv50fYAvsdt3e07lzdrK+MPW4zmxMzfmzeUjrDwbPeM1ryvVngUrc8RMP39KNrYlf1PG4pKUFnwFoYbTLkZ8zWWu8LzAhVOzkgm8i4nzav746SO0Hcu7lEEKk8xAhfOiwafi+Z+JIgGP/yjqn3s2kY9GEXnoF21vI0uotbbUjIhwbvSNo2TJu44w2FvSiPLPq+7lUHa/0icrJAXGSo+vA1o6pWk4J18KVjO1oemM0adK8am3tFAposZ4kq6hOZGFJopebuUhzSQCSEURsY5HpMmNb4dW5CWpAv6t9WMRtfUIphFRIg+MwvzHV306aCw0CH0HIKAcoQ2nE2d+E+0UnlYRRxBPd9NvT+5zOfAZL09SoKoYW/8153ADnvLCyaCHOQm5CYMt7vxfiI98bkhfg0W8myuafed/5HdsHR8KEsSXhsAhyhePpFboe3eKf8B6dBfnnOfoj2WH6JLW2nNtNlihVCgPPCfGRKe3nAOqBTNQVwaUKE4lPRMHX8y1mLd1pMA6boYphv+2MuIg/NKK8Bs2JH/KCJYanAAZdK8W9rRpB1wM9mEOBdRDCaFSyDS2XL0PIp+0S+aRsuSham4vVEAl9OlNt0NGOP5YaI2KzHkz2nYXSiW+IjFkSB5QoCbpuJUuJWftPD+MZ5l1DGki0M8SHNw8dLTv1Cnt0sHXpvpXpwG6X/xbQzHpawZQaGrSLgeSj1vxHU9pLKaxkfhdWrIkKgF8K944isYjPcp0HER0+YbIm+S+oNCojbQHivD8THoDl8rfQV2AjtWJ+IUnt4EskZb/v3UzuErWfW89uAH2zVcFg/Bz/u3vpFYciisM34UFXr4SiwuCq5t+v1OrzixLRwBLz8nTyCw7Wva1d0FV9fAI9e0ZSsa6wMnj26lZw1XF3bulMi9XBhQzn51Sjte6bJ3L0kuo5exgmH8pCPm4LIU2rMHb+TjBJ+pRHgTSww1Q5+IydYupBgpYybd7zitbPzN9fEYffGwleNa1dAzcDyT5NlSj2zKqanFcKpVLrngQvzIphhiPkEB3V9+L9c5GJICQq1yE3/pyp4J0/x34zQUAGA6pg/FIUdhrP7w6rHASCp/MbML"; +const _U = "1DTJ3h1kzcyWk6JTQx442zNi4-ZyfLBWXCiDl6bKiJgghfbtWarzHY5HTnDaas9kfBgLBO6RAcP2e0bR8fToietdr1Q5TO39Nk12l11gGvWjTrzmGF_UcSBnoJK2PWejLuLTz-Qalh3GgO3M2iBkToEZC6ZaodDSLUeaqgCTIy_qJrLGC2agm4lh37Sh5ojs9MHhkuayh4-CuTcrolX5SXQ"; + +module.exports = { + config: { + name: "dalle", + version: "1.0.2", + author: "hedroxyy", + role: 0, + countDown: 5, + shortDescription: { en: "dalle3 image generator" }, + longDescription: { en: "dalle3 is a image generator powdered by OpenAi" }, + category: "ai", + guide: { en: "{prefix}dalle " } + }, + + onStart: async function ({ api, event, args }) { + const prompt = args.join(" "); + + try { + const res = await axios.get(`https://apis-dalle-gen.onrender.com/dalle3?auth_cookie_U=${_U}&auth_cookie_KievRPSSecAuth=${KievRPSSecAuth}&prompt=${encodeURIComponent(prompt)}`); + const data = res.data.results.images; + + if (!data || data.length === 0) { + api.sendMessage("response received but imgurl are missing ", event.threadID, event.messageID); + return; + } + + const imgData = []; + + for (let i = 0; i < Math.min(4, data.length); i++) { + const imgResponse = await axios.get(data[i].url, { responseType: 'arraybuffer' }); + const imgPath = path.join(__dirname, 'cache', `${i + 1}.jpg`); + await fs.outputFile(imgPath, imgResponse.data); + imgData.push(fs.createReadStream(imgPath)); + } + + await api.sendMessage({ + attachment: imgData, + body: `Here's your generated image` + }, event.threadID, event.messageID); + + } catch (error) { + api.sendMessage("Can't Full Fill this request ", event.threadID, event.messageID); + } + } +}; From 68e076f6cee9859d6d33924696033417249d5832 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 19:33:03 +0545 Subject: [PATCH 57/97] Create join.js --- scripts/cmds/join.js | 81 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 scripts/cmds/join.js diff --git a/scripts/cmds/join.js b/scripts/cmds/join.js new file mode 100644 index 0000000000..aca0336240 --- /dev/null +++ b/scripts/cmds/join.js @@ -0,0 +1,81 @@ +const axios = require("axios"); +const fs = require("fs-extra"); +const request = require("request"); + +module.exports = { + config: { + name: "join", + version: "2.0", + author: "Kshitiz", + countDown: 5, + role: 2, + shortDescription: "Join the group that bot is in", + longDescription: "", + category: "user", + guide: { + en: "{p}{n}", + }, + }, + + onStart: async function ({ api, event }) { + try { + const groupList = await api.getThreadList(10, null, ['INBOX']); + + const filteredList = groupList.filter(group => group.threadName !== null); + + if (filteredList.length === 0) { + api.sendMessage('No group chats found.', event.threadID); + } else { + const formattedList = filteredList.map((group, index) => + `โ”‚${index + 1}. ${group.threadName}\nโ”‚๐“๐ˆ๐ƒ: ${group.threadID}` + ); + const message = `โ•ญโ”€โ•ฎ\nโ”‚๐‹๐ข๐ฌ๐ญ ๐จ๐Ÿ ๐ ๐ซ๐จ๐ฎ๐ฉ ๐œ๐ก๐š๐ญ๐ฌ:\n${formattedList.map(line => `${line}`).join("\n")}\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€๊”ช`; + + const sentMessage = await api.sendMessage(message, event.threadID); + global.GoatBot.onReply.set(sentMessage.messageID, { + commandName: 'join', + messageID: sentMessage.messageID, + author: event.senderID, + }); + } + } catch (error) { + console.error("Error listing group chats", error); + } + }, + + onReply: async function ({ api, event, Reply, args }) { + const { author, commandName } = Reply; + + if (event.senderID !== author) { + return; + } + + const groupIndex = parseInt(args[0], 10); + + if (isNaN(groupIndex) || groupIndex <= 0) { + api.sendMessage('Invalid input.\nPlease provide a valid number.', event.threadID, event.messageID); + return; + } + + try { + const groupList = await api.getThreadList(10, null, ['INBOX']); + const filteredList = groupList.filter(group => group.threadName !== null); + + if (groupIndex > filteredList.length) { + api.sendMessage('Invalid group number.\nPlease choose a number within the range.', event.threadID, event.messageID); + return; + } + + const selectedGroup = filteredList[groupIndex - 1]; + const groupID = selectedGroup.threadID; + + await api.addUserToGroup(event.senderID, groupID); + api.sendMessage(`You have joined the group chat: ${selectedGroup.threadName}`, event.threadID, event.messageID); + } catch (error) { + console.error("Error joining group chat", error); + api.sendMessage('An error occurred while joining the group chat.\nPlease try again later.', event.threadID, event.messageID); + } finally { + global.GoatBot.onReply.delete(event.messageID); + } + }, +}; From 38b68513f3f480eb6a2b287e9f487539d44ecee4 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 19:37:22 +0545 Subject: [PATCH 58/97] Create p3ssy.js --- scripts/cmds/p3ssy.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/cmds/p3ssy.js diff --git a/scripts/cmds/p3ssy.js b/scripts/cmds/p3ssy.js new file mode 100644 index 0000000000..7496738022 --- /dev/null +++ b/scripts/cmds/p3ssy.js @@ -0,0 +1,32 @@ +module.exports = { + config: { + name: "pussy", + aliases: ["18+"], + version: "1.0", + author: "Doru fix by kivv", + countDown: 5, + role: 2, + shortDescription: "send you pic of pussy", + longDescription: "sends u pic of girls pussy", + category: "18+", + guide: "{pn}" + }, + + onStart: async function ({ message }) { + var link = [ +"https://i.ibb.co/jfqMF07/image.jpg", +"https://i.ibb.co/tBBCS4y/image.jpg", +"https://i.ibb.co/3zpyMVY/image.jpg", +"https://i.ibb.co/gWbWT8k/image.jpg", +"https://i.ibb.co/mHtyD1P/image.jpg", +"https://i.ibb.co/vPHNhdY/image.jpg", +"https://i.ibb.co/rm6rPjb/image.jpg", +"https://i.ibb.co/7GpN2GW/image.jpg", +"https://i.ibb.co/CnfMVpg/image.jpg", + ] +let img = link[Math.floor(Math.random()*link.length)] +message.send({ + body: 'ใ€Œ Pussy๐Ÿ’ฆ๐Ÿฅต ใ€',attachment: await global.utils.getStreamFromURL(img) +}) +} + } From 6aa35374ff1021d8ea98969558188dfad97811bf Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 19:52:09 +0545 Subject: [PATCH 59/97] Create wanted.js --- scripts/cmds/wanted.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 scripts/cmds/wanted.js diff --git a/scripts/cmds/wanted.js b/scripts/cmds/wanted.js new file mode 100644 index 0000000000..f098ede4a7 --- /dev/null +++ b/scripts/cmds/wanted.js @@ -0,0 +1,33 @@ +const DIG = require("discord-image-generation"); +const fs = require("fs-extra"); + +module.exports = { + config: { + name: "wanted", + version: "1.1", + author: "hedroxyy", + countDown: 5, + role: 0, + shortDescription: "Generate a 'wanted' image with your own avatar.", + longDescription: "Generate a 'wanted' image with your own avatar.", + category: "image", + guide: { + en: "{pn}" + } + }, + + onStart: async function ({ event, message, usersData }) { + const uid = event.senderID; + const avatarURL = await usersData.getAvatarUrl(uid); // Fetch your own avatar URL + + const img = await new DIG.Wanted().getImage(avatarURL); + const pathSave = `${__dirname}/tmp/${uid}_Wanted.png`; + + fs.writeFileSync(pathSave, Buffer.from(img)); + + message.reply({ + body: "ใ€Œ ๐Ÿ”ฅ ใ€", + attachment: fs.createReadStream(pathSave) + }, () => fs.unlinkSync(pathSave)); + } +}; From 51988445311403706fd2f7554422b66bb3a45b40 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 19:57:11 +0545 Subject: [PATCH 60/97] Create unforgivable.js --- scripts/cmds/unforgivable.js | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 scripts/cmds/unforgivable.js diff --git a/scripts/cmds/unforgivable.js b/scripts/cmds/unforgivable.js new file mode 100644 index 0000000000..0a48b61831 --- /dev/null +++ b/scripts/cmds/unforgivable.js @@ -0,0 +1,33 @@ +const axios = require('axios'); +const jimp = require("jimp"); +const fs = require("fs"); + +module.exports = { + config: { + name: "unforgivable", + aliases: ["god"], + version: "1.0", + author: "Samir", + countDown: 5, + role: 0, + shortDescription: "Get god's notification on your searching", + longDescription: "", + category: "fun", + guide: "{pn}" + }, + + onStart: async function ({ message, args }) { + const text = args.join(" "); + if (!text) { + return message.reply(`Please enter a text`); + } else { + const img = `https://api.popcat.xyz/unforgivable?text=${encodeURIComponent(text)}`; + + const form = { + body: `` + }; + form.attachment = [] + form.attachment[0] = await global.utils.getStreamFromURL(img); + message.reply(form); + } +}}; From c787ffc6f7594bdf9eb570ab41fc900d757fd51f Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 20:03:07 +0545 Subject: [PATCH 61/97] Create trash.js --- scripts/cmds/trash.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 scripts/cmds/trash.js diff --git a/scripts/cmds/trash.js b/scripts/cmds/trash.js new file mode 100644 index 0000000000..8c9c078a20 --- /dev/null +++ b/scripts/cmds/trash.js @@ -0,0 +1,31 @@ +const DIG = require("discord-image-generation"); +const fs = require("fs-extra"); + +module.exports = { + config: { + name: "trash", + version: "1.1", + author: "hedroxyy", + countDown: 5, + role: 0, + shortDescription: "Trash image", + longDescription: "Trash image", + category: "image", + guide: { + vi: "{pn} [@tag | ฤ‘แปƒ trแป‘ng]", + en: "{pn} [@tag]" + } + }, + + onStart: async function ({ event, message, usersData }) { + const uid = Object.keys(event.mentions)[0] + if(!uid) return message.reply("Mention someone") + const avatarURL = await usersData.getAvatarUrl(uid); + const img = await new DIG.Trash().getImage(avatarURL); + const pathSave = `${__dirname}/tmp/${uid}_Trash.png`; + fs.writeFileSync(pathSave, Buffer.from(img)); + message.reply({ + attachment: fs.createReadStream(pathSave) + }, () => fs.unlinkSync(pathSave)); + } +}; From 316429ca039d8c7b2348f42ee29583c664e7d662 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 20:21:26 +0545 Subject: [PATCH 62/97] Create sugarmomma.js --- scripts/cmds/sugarmomma.js | 115 +++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 scripts/cmds/sugarmomma.js diff --git a/scripts/cmds/sugarmomma.js b/scripts/cmds/sugarmomma.js new file mode 100644 index 0000000000..35871cc109 --- /dev/null +++ b/scripts/cmds/sugarmomma.js @@ -0,0 +1,115 @@ +module.exports = { + config: { + name: "sugarmomma", + aliases: ["n3de"], + version: "1.0", + author: "hedroxyy", + countDown: 5, + role: 2, + shortDescription: "send you pic of nude", + longDescription: "sends u pic of girls nude", + category: "18+", + guide: "{pn}" + }, + + onStart: async function ({ message }) { + var link = [ +"https://i.imgur.com/T5BPkRG.jpg", +"https://i.imgur.com/69MT3Wg.jpg", +"https://i.imgur.com/z6EtvVm.jpg", +"https://i.imgur.com/hf3KluZ.jpg", +"https://i.imgur.com/9XxaYI3.jpg", +"https://i.imgur.com/rCSoCaA.jpg", +"https://i.imgur.com/6olWIAr.jpg", +"https://i.imgur.com/AcKfCpt.jpg", +"https://i.imgur.com/OA6wMjp.jpg", +"https://i.imgur.com/WBUspj9.jpg", +"https://i.imgur.com/GBzR0aY.jpg", +"https://i.imgur.com/EefsUX3.jpg", +"https://i.imgur.com/kWqwF1K.jpg", +"https://i.imgur.com/tUee6NZ.jpg", +"https://i.imgur.com/NJSUN9k.jpg", +"https://i.imgur.com/GxPSGo9.jpg", +"https://i.imgur.com/junGPIa.jpg", +"https://i.imgur.com/fj0WV5S.jpg", +"https://i.imgur.com/trR1T6P.jpg", +"https://i.imgur.com/5GPy7MZ.jpg", +"https://i.imgur.com/kPpcoFe.jpg", +"https://i.imgur.com/DibHjLg.jpg", +"https://i.imgur.com/lzY1HP3.jpg", +"https://i.imgur.com/z7oHPeD.jpg", +"https://i.imgur.com/2kW0UrZ.jpg", +"https://i.imgur.com/2TJXTM8.jpg", +"https://i.imgur.com/hHkxDMt.jpg", +"https://i.imgur.com/H7vs8c6.jpg", +"https://i.imgur.com/jVSz5tX.jpg", +"https://i.imgur.com/vF32mr2.jpg", +"https://i.imgur.com/BoJDDpm.jpg", +"https://i.imgur.com/GbAkVR3.jpg", +"https://i.imgur.com/aMw2mEz.jpg", +"https://i.imgur.com/egPMyvA.jpg", +"https://i.imgur.com/OPZDGUY.jpg", +"https://i.imgur.com/dxbjwmx.jpg", +"https://i.imgur.com/FNQQETm.jpg", +"https://i.imgur.com/hT7bbZr.jpg", +"https://i.imgur.com/0Eg5ZN4.jpg", +"https://i.imgur.com/Qle3LJi.jpg", +"https://i.imgur.com/pzJq8ay.jpg", +"https://i.imgur.com/NyqSI83.jpg", +"https://i.imgur.com/p41qMvY.jpg", +"https://i.imgur.com/p7EiSkE.jpg", +"https://i.imgur.com/JYUOHUd.jpg", +"https://i.imgur.com/cWxtrc2.jpg", +"https://i.imgur.com/2pSSMtl.jpg", +"https://i.imgur.com/DAnirH8.jpg", +"https://i.imgur.com/8XyrCGu.jpg", +"https://i.imgur.com/I7rtkwT.jpg", +"https://i.imgur.com/KCo1P0u.jpg", +"https://i.imgur.com/GLIwmQk.jpg", +"https://i.imgur.com/Mue8s3E.jpg", +"https://i.imgur.com/Fak0Ahg.jpg", +"https://i.imgur.com/EDsi80I.jpg", +"https://i.imgur.com/JvVpF6W.jpg", +"https://i.imgur.com/I3CE748.jpg", +"https://i.imgur.com/CH0PxJP.jpg", +"https://i.imgur.com/3T1q41U.jpg", +"https://i.imgur.com/WD3uX9V.jpg", +"https://i.imgur.com/7sS6lji.jpg", +"https://i.imgur.com/kFAfAC3.jpg", +"https://i.imgur.com/EpyMadP.jpg", +"https://i.imgur.com/9AJt2Tt.jpg", +"https://i.imgur.com/55EbaeY.jpg", +"https://i.imgur.com/xRJSAmJ.jpg", +"https://i.imgur.com/kXA2fSX.jpg", +"https://i.imgur.com/dy1YlJs.jpg", +"https://i.imgur.com/0LlpoXG.jpg", +"https://i.imgur.com/Kof1KXr.jpg", +"https://i.imgur.com/xIgnYGo.jpg", +"https://i.imgur.com/4cFgFZq.jpg", +"https://i.imgur.com/d8k4a6G.jpg", +"https://i.imgur.com/eraz44H.jpg", +"https://i.imgur.com/uSHLM8y.jpg", +"https://i.imgur.com/2iy9KnD.jpg", +"https://i.imgur.com/Aew0gjm.jpg", +"https://i.imgur.com/sxXm5cI.jpg", +"https://i.imgur.com/2or8urJ.jpg", +"https://i.imgur.com/cslJLNt.jpg", +"https://i.imgur.com/zQztjGM.jpg", +"https://i.imgur.com/dyluWmm.jpg", +"https://i.imgur.com/CgAc5ux.jpg", +"https://i.imgur.com/Z5ph1wc.jpg", +"https://i.imgur.com/0bRLqAR.jpg", +"https://i.imgur.com/x68KtYI.jpg", +"https://i.imgur.com/cAich41.jpg", +"https://i.imgur.com/BMcYATY.jpg", +"https://i.imgur.com/E9PYK7J.jpg", +"https://i.imgur.com/1oaM7ai.jpg", +"https://i.imgur.com/Urx9Ijl.jpg", +"https://i.imgur.com/QYGOZuK.jpg", + ] +let img = link[Math.floor(Math.random()*link.length)] +message.send({ + body: 'ใ€Œ Sugar Momma ๐Ÿ’ฆ๐Ÿฅต ใ€',attachment: await global.utils.getStreamFromURL(img) +}) +} + } From d0c0cc82d857bc3d92e9d56b7955f214d942bb07 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 20:53:28 +0545 Subject: [PATCH 63/97] Create tinyurl.js --- scripts/cmds/tinyurl.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 scripts/cmds/tinyurl.js diff --git a/scripts/cmds/tinyurl.js b/scripts/cmds/tinyurl.js new file mode 100644 index 0000000000..1fcbc4c3ab --- /dev/null +++ b/scripts/cmds/tinyurl.js @@ -0,0 +1,38 @@ +const axios = require("axios"); +const fs = require('fs-extra'); +const path = require('path'); +const { shortenURL } = global.utils; + +async function shortURL(api, event) { + if (event.type !== "message_reply" || !event.messageReply.attachments || event.messageReply.attachments.length === 0) { + return api.sendMessage({ body: "โŒ | Please reply to an attachment." }, event.threadID, event.messageID); + } + + const attachment = event.messageReply.attachments[0]; + + try { + const shortUrl = await shortenURL(attachment.url); + api.sendMessage({ body: `${shortUrl}` }, event.threadID, event.messageID); + } catch (error) { + api.sendMessage({ body: "โŒ | Error occurred while shortening URL." }, event.threadID, event.messageID); + console.error(error); + } +} + +module.exports = { + config: { + name: "tinyurl", + aliases: ["turl"], + version: "2.0", + author: "Vex_Kshitiz", + countDown: 10, + role: 0, + shortDescription: "alternative of imgurl", + longDescription: "alternative of imgurl", + category: "utility", + guide: "{p}tinyurl" + }, + onStart: function ({ api, event }) { + return shortURL(api, event); + } +}; From 3713da0c88b6249677cc492616e719d66d91e891 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 22:45:06 +0545 Subject: [PATCH 64/97] Update gpt.js --- scripts/cmds/gpt.js | 222 +++++++------------------------------------- 1 file changed, 33 insertions(+), 189 deletions(-) diff --git a/scripts/cmds/gpt.js b/scripts/cmds/gpt.js index 0f1b6e0ed9..c8a1dcbaae 100644 --- a/scripts/cmds/gpt.js +++ b/scripts/cmds/gpt.js @@ -1,192 +1,36 @@ -const axios = require('axios'); - -// config -const apiKey = ""; -const maxTokens = 500; -const numberGenerateImage = 4; -const maxStorageMessage = 4; - -if (!global.temp.openAIUsing) - global.temp.openAIUsing = {}; -if (!global.temp.openAIHistory) - global.temp.openAIHistory = {}; - -const { openAIUsing, openAIHistory } = global.temp; +.cmd install gpt.js const axios = require('axios'); module.exports = { - config: { - name: "gpt", - version: "1.4", - author: "NTKhang", - countDown: 5, - role: 0, - description: { - vi: "GPT chat", - en: "GPT chat" - }, - category: "box chat", - guide: { - vi: " {pn} - tแบกo hรฌnh แบฃnh tแปซ nแป™i dung" - + "\n {pn} - xรณa lแป‹ch sแปญ chat vแป›i gpt" - + "\n {pn} - chat vแป›i gpt", - en: " {pn} - create image from content" - + "\n {pn} - clear chat history with gpt" - + "\n {pn} - chat with gpt" - } - }, - - langs: { - vi: { - apiKeyEmpty: "Vui lรฒng cung cแบฅp api key cho openai tแบกi file scripts/cmds/gpt.js", - invalidContentDraw: "Vui lรฒng nhแบญp nแป™i dung bแบกn muแป‘n vแบฝ", - yourAreUsing: "Bแบกn ฤ‘ang sแปญ dแปฅng gpt chat, vui lรฒng chแป quay lแบกi sau khi yรชu cแบงu trฦฐแป›c kแบฟt thรบc", - processingRequest: "ฤang xแปญ lรฝ yรชu cแบงu cแปงa bแบกn, quรก trรฌnh nร y cรณ thแปƒ mแบฅt vร i phรบt, vui lรฒng chแป", - invalidContent: "Vui lรฒng nhแบญp nแป™i dung bแบกn muแป‘n chat", - error: "ฤรฃ cรณ lแป—i xแบฃy ra\n%1", - clearHistory: "ฤรฃ xรณa lแป‹ch sแปญ chat cแปงa bแบกn vแป›i gpt" - }, - en: { - apiKeyEmpty: "Please provide api key for openai at file scripts/cmds/gpt.js", - invalidContentDraw: "Please enter the content you want to draw", - yourAreUsing: "You are using gpt chat, please wait until the previous request ends", - processingRequest: "Processing your request, this process may take a few minutes, please wait", - invalidContent: "Please enter the content you want to chat", - error: "An error has occurred\n%1", - clearHistory: "Your chat history with gpt has been deleted" - } - }, - - onStart: async function ({ message, event, args, getLang, prefix, commandName }) { - if (!apiKey) - return message.reply(getLang('apiKeyEmpty', prefix)); - - switch (args[0]) { - case 'img': - case 'image': - case 'draw': { - if (!args[1]) - return message.reply(getLang('invalidContentDraw')); - if (openAIUsing[event.senderID]) - return message.reply(getLang("yourAreUsing")); - - openAIUsing[event.senderID] = true; - - let sending; - try { - sending = message.reply(getLang('processingRequest')); - const responseImage = await axios({ - url: "https://api.openai.com/v1/images/generations", - method: "POST", - headers: { - "Authorization": `Bearer ${apiKey}`, - "Content-Type": "application/json" - }, - data: { - prompt: args.slice(1).join(' '), - n: numberGenerateImage, - size: '1024x1024' - } - }); - const imageUrls = responseImage.data.data; - const images = await Promise.all(imageUrls.map(async (item) => { - const image = await axios.get(item.url, { - responseType: 'stream' - }); - image.data.path = `${Date.now()}.png`; - return image.data; - })); - return message.reply({ - attachment: images - }); - } - catch (err) { - const errorMessage = err.response?.data.error.message || err.message; - return message.reply(getLang('error', errorMessage || '')); - } - finally { - delete openAIUsing[event.senderID]; - message.unsend((await sending).messageID); - } - } - case 'clear': { - openAIHistory[event.senderID] = []; - return message.reply(getLang('clearHistory')); - } - default: { - if (!args[0]) - return message.reply(getLang('invalidContent')); - - handleGpt(event, message, args, getLang, commandName); - } - } - }, - - onReply: async function ({ Reply, message, event, args, getLang, commandName }) { - const { author } = Reply; - if (author != event.senderID) - return; - - handleGpt(event, message, args, getLang, commandName); - } + config: { + name: "gpt", + version: "1.0", + author: "YourName", + shortDescription: "Generate text using GPT-4 API.", + longDescription: "Generates text using GPT-4 API based on the provided prompt.", + category: "text", + guide: { + en: "{pn} prompt_text" + } + }, + + onStart: async function ({ message, args }) { + const prompt = args.join(' '); + if (!prompt) { + return message.reply("Please provide a prompt for GPT generation."); + } + + try { + const apiUrl = `https://joshweb.click/new/gpt-4_adv?prompt=${encodeURIComponent(prompt)}`; + const response = await axios.get(apiUrl); + + if (response.status === 200 && response.data && response.data.result && response.data.result.reply) { + message.reply(response.data.result.reply); + } else { + message.reply("Failed to generate text. Please try again later."); + } + } catch (error) { + console.error("Error fetching from GPT API:", error); + message.reply("Failed to generate text. Please try again later."); + } + } }; - -async function askGpt(event) { - const response = await axios({ - url: "https://api.openai.com/v1/chat/completions", - method: "POST", - headers: { - "Authorization": `Bearer ${apiKey}`, - "Content-Type": "application/json" - }, - data: { - model: "gpt-3.5-turbo", - messages: openAIHistory[event.senderID], - max_tokens: maxTokens, - temperature: 0.7 - } - }); - return response; -} - -async function handleGpt(event, message, args, getLang, commandName) { - try { - openAIUsing[event.senderID] = true; - - if ( - !openAIHistory[event.senderID] || - !Array.isArray(openAIHistory[event.senderID]) - ) - openAIHistory[event.senderID] = []; - - if (openAIHistory[event.senderID].length >= maxStorageMessage) - openAIHistory[event.senderID].shift(); - - openAIHistory[event.senderID].push({ - role: 'user', - content: args.join(' ') - }); - - const response = await askGpt(event); - const text = response.data.choices[0].message.content; - - openAIHistory[event.senderID].push({ - role: 'assistant', - content: text - }); - - return message.reply(text, (err, info) => { - global.GoatBot.onReply.set(info.messageID, { - commandName, - author: event.senderID, - messageID: info.messageID - }); - }); - } - catch (err) { - const errorMessage = err.response?.data.error.message || err.message || ""; - return message.reply(getLang('error', errorMessage)); - } - finally { - delete openAIUsing[event.senderID]; - } -} \ No newline at end of file From d95c420b4ea45a64c652e68165ddbd425842330d Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 23:17:58 +0545 Subject: [PATCH 65/97] Create randomuseragent.js --- scripts/cmds/randomuseragent.js | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 scripts/cmds/randomuseragent.js diff --git a/scripts/cmds/randomuseragent.js b/scripts/cmds/randomuseragent.js new file mode 100644 index 0000000000..eb5c49130a --- /dev/null +++ b/scripts/cmds/randomuseragent.js @@ -0,0 +1,51 @@ +.cmd install randomuseragent.js const { Random } = require('random-js'); + +module.exports = { + config: { + name: "randomuseragent", + aliases: ["rua"], + version: "1.1", + author: "hedroxyy", + countDown: 1, + role: 0, + shortDescription: "Generate and send random user agents", + longDescription: "Generate a specified number of random user agents and send them one by one.", + category: "tools", + guide: "{pn} {number of user agents}" + }, + + onStart: async function ({ event, message, args }) { + const numberOfUserAgents = parseInt(args[0]) || 5; // Default to 5 if no number is provided + const userAgents = generateRandomUserAgents(numberOfUserAgents); + + // Send each user agent one by one + for (let i = 0; i < userAgents.length; i++) { + const userAgent = userAgents[i]; + await message.send(`${userAgent}`); + } + } +}; + +function generateRandomUserAgents(numberOfUserAgents) { + const random = new Random(); + const userAgents = []; + + for (let i = 0; i < numberOfUserAgents; i++) { + const a = "Mozilla/5.0 (Symbian/3; Series60/"; + const b = random.integer(1, 9); + const c = random.integer(1, 9); + const d = "SamsungBrowser"; + const e = random.integer(100, 9999); + const f = "NEO-AL00 Build/HUAWEINEO-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/"; + const g = random.integer(1, 9); + const h = random.integer(1, 4); + const i1 = random.integer(1, 4); + const j = random.integer(1, 4); + const k = "Mobile Safari/537.36"; + + const userAgent = `${a}${b}.${c} ${d}${e}${f}${g}.${h}.${i1}.${j} ${k}`; + userAgents.push(userAgent); + } + + return userAgents; +} From 88d02624caa506de44a69a29d9339d2b607cea85 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Fri, 5 Jul 2024 23:27:39 +0545 Subject: [PATCH 66/97] Update gpt.js --- scripts/cmds/gpt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cmds/gpt.js b/scripts/cmds/gpt.js index c8a1dcbaae..899d10b04d 100644 --- a/scripts/cmds/gpt.js +++ b/scripts/cmds/gpt.js @@ -1,4 +1,4 @@ -.cmd install gpt.js const axios = require('axios'); +const axios = require('axios'); module.exports = { config: { From d7cc6348ac5979f5337d7af4e35928500cee070a Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 09:26:25 +0545 Subject: [PATCH 67/97] Create prompt.js --- scripts/cmds/prompt.js | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 scripts/cmds/prompt.js diff --git a/scripts/cmds/prompt.js b/scripts/cmds/prompt.js new file mode 100644 index 0000000000..86d4d02172 --- /dev/null +++ b/scripts/cmds/prompt.js @@ -0,0 +1,50 @@ +const { existsSync, mkdirSync } = require("fs"); +const axios = require("axios"); +const tinyurl = require('tinyurl'); + +module.exports = { + config: { + name: "prompt", + aliases: [], + version: "1.0", + author: "Vex_Kshitiz", + countDown: 5, + role: 0, + shortDescription: "Generate prompt for an image", + longDescription: "generate prompt for an image", + category: "image", + guide: { + en: "{p}prompt (reply to image)" + } + }, + + onStart: async function ({ message, event, api }) { + api.setMessageReaction("๐Ÿ•", event.messageID, (err) => {}, true); + const { type, messageReply } = event; + const { attachments, threadID } = messageReply || {}; + + if (type === "message_reply" && attachments) { + const [attachment] = attachments; + const { url, type: attachmentType } = attachment || {}; + + if (!attachment || attachmentType !== "photo") { + return message.reply("Reply to an image."); + } + + try { + const tinyUrl = await tinyurl.shorten(url); + const apiUrl = `https://prompt-gen-eight.vercel.app/kshitiz?url=${encodeURIComponent(tinyUrl)}`; + const response = await axios.get(apiUrl); + + const { prompt } = response.data; + + message.reply(prompt, threadID); + } catch (error) { + console.error(error); + message.reply("โŒ An error occurred while generating the prompt."); + } + } else { + message.reply("Please reply to an image."); + } + } +}; From c416a19d630d264c232d6ac622284823fbec1f15 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 09:45:24 +0545 Subject: [PATCH 68/97] Create jail.js --- scripts/cmds/jail.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 scripts/cmds/jail.js diff --git a/scripts/cmds/jail.js b/scripts/cmds/jail.js new file mode 100644 index 0000000000..beb1b2b309 --- /dev/null +++ b/scripts/cmds/jail.js @@ -0,0 +1,44 @@ +.cmd install jail.js const DIG = require("discord-image-generation"); +const fs = require("fs-extra"); + +module.exports = { + config: { + name: "jail", + version: "1.1", + author: "your love", + countDown: 5, + role: 0, + shortDescription: "Jail image", + longDescription: "Jail image", + category: "fun", + guide: { + en: "{pn} @tag" + } + }, + + langs: { + vi: { + noTag: "Bแบกn phแบฃi tag ngฦฐแปi bแบกn muแป‘n tรน" + }, + en: { + noTag: "TAG THE RAPIST ๐Ÿ’€" + } + }, + + onStart: async function ({ event, message, usersData, args, getLang }) { + const uid1 = event.senderID; + const uid2 = Object.keys(event.mentions)[0]; + if (!uid2) + return message.reply(getLang("noTag")); + const avatarURL1 = await usersData.getAvatarUrl(uid1); + const avatarURL2 = await usersData.getAvatarUrl(uid2); + const img = await new DIG.Jail().getImage(avatarURL2); + const pathSave = `${__dirname}/tmp/${uid2}_Jail.png`; + fs.writeFileSync(pathSave, Buffer.from(img)); + const content = args.join(' ').replace(Object.keys(event.mentions)[0], ""); + message.reply({ + body: `WE CAUGHT THE CRIMINAL ๐Ÿ‘ฎโ€โ™‚๏ธ๐Ÿš”`, + attachment: fs.createReadStream(pathSave) + }, () => fs.unlinkSync(pathSave)); + } +}; From 1b59b36e78bea9e9a1255650bd77f81be71e5f39 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 09:45:55 +0545 Subject: [PATCH 69/97] Create joke.js --- scripts/cmds/joke.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/cmds/joke.js diff --git a/scripts/cmds/joke.js b/scripts/cmds/joke.js new file mode 100644 index 0000000000..6edb5b72bf --- /dev/null +++ b/scripts/cmds/joke.js @@ -0,0 +1,37 @@ +const axios = require('axios'); + +module.exports = { + config: { + name: "joke", + version: "1.0", + author: "Maher", + countDown: 0, + role: 2, + shortDescription: { + vi: "Lแบฅy mแป™t cรขu chuyแป‡n cฦฐแปi ngแบซu nhiรชn vแป chรขm biแบฟm.", + en: "Gets a random pun joke." + }, + longDescription: { + vi: "Lแบฅy mแป™t cรขu chuyแป‡n cฦฐแปi ngแบซu nhiรชn vแป chรขm biแบฟm tแปซ JokeAPI (https://jokeapi.dev/).", + en: "Gets a random pun joke from JokeAPI (https://jokeapi.dev/)." + }, + category: "fun", + guide: "", + }, + + onStart: async function ({ message, event }) { + try { + const jokeResponse = await axios.get('https://v2.jokeapi.dev/joke/pun'); + const joke = jokeResponse.data; + + if (joke.type === 'single') { + message.reply(joke.joke); + } else if (joke.type === 'twopart') { + message.reply(`${joke.setup}\n\n${joke.delivery}`); + } + } catch (error) { + console.log(error); + message.reply("Sorry, I couldn't think of a joke right now."); + } + } +}; From ba4d270de106c79633602106a02164ff62f93a2f Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 09:48:43 +0545 Subject: [PATCH 70/97] Create insult.js --- scripts/cmds/insult.js | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 scripts/cmds/insult.js diff --git a/scripts/cmds/insult.js b/scripts/cmds/insult.js new file mode 100644 index 0000000000..d5963725ce --- /dev/null +++ b/scripts/cmds/insult.js @@ -0,0 +1,46 @@ +const axios = require("axios"); + +module.exports = { +config: { +name: "insult", +aliases: [], +version: "1.0", +author: "kshitiz", +countDown: 5, +role: 0, +shortDescription: "", +longDescription: "Insult someone by using this cmd", +category: "", +guide: "{pn} @mention", +}, + +onStart: async function ({ api, event, args }) { +try { +const mention = Object.keys(event.mentions); + +if (mention.length !== 1) { +api.sendMessage("Please mention one person to insult.", event.threadID); +return; +} + +const mentionName = event.mentions[mention[0]].replace("@", ""); + +if (mentionName.toLowerCase().includes("Strรฃwhat")) {//re1place Strawhat with your name +api.sendMessage("Ayo Gay You can't insult my owner๐Ÿคฌ ", event.threadID); +return; +} + +const url = "https://evilinsult.com/generate_insult.php?lang=en&type=json"; + +const response = await axios.get(url); +const insult = response.data.insult; + +const insultMessage = `${mentionName}, ${insult}`; +api.sendMessage(insultMessage, event.threadID); + +} catch (error) { +console.error(error); +api.sendMessage("Error!", event.threadID); +} +}, +}; From a89cafb6f62c39d901b24ddb6b2014868c195be3 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 09:58:50 +0545 Subject: [PATCH 71/97] Create aninews.js --- scripts/cmds/aninews.js | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 scripts/cmds/aninews.js diff --git a/scripts/cmds/aninews.js b/scripts/cmds/aninews.js new file mode 100644 index 0000000000..49c39663fe --- /dev/null +++ b/scripts/cmds/aninews.js @@ -0,0 +1,36 @@ +const malScraper = require('mal-scraper'); + +module.exports = { + config: { + name: "aninews", + aliases: ["animenews"], + version: "1.0", + author: "Samir", + countDown: 5, + role: 0, + shortDescription: { + en: "get latest news of anime from MyAnimeList" + }, + longDescription: { + en: "get latest news of anime from MyAnimeList" + }, + category: "Anime", + guide: { + en: "{p}malnews" + } + }, + onStart: async function ({ api, event }) { + const nbNews = 5; + + malScraper.getNewsNoDetails(nbNews) + .then((n) => api.sendMessage( + "TOP 5 LATEST MAL NEWS\n\nใ€Ž 1 ใ€" + n[0].title + "\n\nใ€Ž 2 ใ€" + n[1].title + "\n\nใ€Ž 3 ใ€" + n[2].title + "\n\nใ€Ž 4 ใ€" + n[3].title + "\n\nใ€Ž 5 ใ€" + n[4].title, + event.threadID, + event.messageID + )) + .catch((err) => { + console.error(err); + api.sendMessage("Sorry, something went wrong while fetching the news.", event.threadID); + }); + } +}; From 8a218797cc75ea75774b15bc332b171eb1cf2dec Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 10:28:17 +0545 Subject: [PATCH 72/97] Create routineofnepalbanda.js --- scripts/cmds/routineofnepalbanda.js | 89 +++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 scripts/cmds/routineofnepalbanda.js diff --git a/scripts/cmds/routineofnepalbanda.js b/scripts/cmds/routineofnepalbanda.js new file mode 100644 index 0000000000..6310eaefd0 --- /dev/null +++ b/scripts/cmds/routineofnepalbanda.js @@ -0,0 +1,89 @@ +const axios = require("axios"); +const fs = require("fs-extra"); +const canvas = require("canvas"); + +module.exports = { + config: { + name: "routineofnepalbanda", + aliases: ["ronb"], + author: "Fun", + countDown: 5, + role: 0, + category: "Fun", + shortDescription: { + en: "make something RONB wrote about you or friends/ something", + }, + }, + wrapText: async (ctx, text, maxWidth) => { + return new Promise((resolve) => { + if (ctx.measureText(text).width < maxWidth) return resolve([text]); + if (ctx.measureText("W").width > maxWidth) return resolve(null); + const words = text.split(" "); + const lines = []; + let line = ""; + while (words.length > 0) { + let split = false; + while (ctx.measureText(words[0]).width >= maxWidth) { + const temp = words[0]; + words[0] = temp.slice(0, -1); + if (split) words[1] = `${temp.slice(-1)}${words[1]}`; + else { + split = true; + words.splice(1, 0, temp.slice(-1)); + } + } + if (ctx.measureText(`${line}${words[0]}`).width < maxWidth) + line += `${words.shift()} `; + else { + lines.push(line.trim()); + line = ""; + } + if (words.length === 0) lines.push(line.trim()); + } + return resolve(lines); + }); + }, + + onStart: async function ({ api, event, args }) { + let { senderID, threadID, messageID } = event; + const { loadImage, createCanvas } = require("canvas"); + const fs = require("fs-extra"); + const axios = require("axios"); + let pathImg = __dirname + "/cache/ronb.png"; + var text = args.join(" "); + if (!text)return api.sendMessage( + "Enter the content of the comment on the board", + threadID, + messageID + ); + let getPorn = ( + await axios.get(`https://i.ibb.co/vhtV1x9/image.jpg`, { + responseType: "arraybuffer", + }) + ).data; + fs.writeFileSync(pathImg, Buffer.from(getPorn, "utf-8")); + let baseImage = await loadImage(pathImg); + let canvas = createCanvas(baseImage.width, baseImage.height); + let ctx = canvas.getContext("2d"); + ctx.drawImage(baseImage, 0, 0, canvas.width, canvas.height); + ctx.font = "200 25px Arial"; + ctx.fillStyle = "#000000"; + ctx.textAlign = "start"; + let fontSize = 23; + while (ctx.measureText(text).width > 2400) { + fontSize--; + ctx.font = `200 ${fontSize}px Arial, sans-serif`; + } + const lines = await this.wrapText(ctx, text, 990); + ctx.fillText(lines.join("\n"), 50, 155); //comment + ctx.beginPath(); + const imageBuffer = canvas.toBuffer(); + fs.writeFileSync(pathImg, imageBuffer); + return api.sendMessage( + { attachment: fs.createReadStream(pathImg) }, + threadID, + () => fs.unlinkSync(pathImg), + messageID + ); + }, +}; From 613cb6356c0cb65413baae24d9d0c282caf061ea Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 10:30:57 +0545 Subject: [PATCH 73/97] Create sadcat.js --- scripts/cmds/sadcat.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 scripts/cmds/sadcat.js diff --git a/scripts/cmds/sadcat.js b/scripts/cmds/sadcat.js new file mode 100644 index 0000000000..05105de4c9 --- /dev/null +++ b/scripts/cmds/sadcat.js @@ -0,0 +1,40 @@ +const axios = require('axios'); +const fs = require('fs'); + +module.exports = { + config: { + name: "sadcat", + aliases: ["sc"], + version: "1.1", + author: "JV BARCENAS", + countDown: 5, + role: 0, + shortDescription: "sadcat with text", + longDescription: "sadcat with text", + category: "image", + guide: { + en: " {pn} {prompt}" + } + }, + + onStart: async function ({ event, message, usersData, args, getLang }) { + const userPrompt = args.join(' '); + + try { + const response = await axios.get(`https://api.popcat.xyz/sadcat?text=${encodeURIComponent(userPrompt)}`, { + responseType: 'arraybuffer' + }); + + const imageData = Buffer.from(response.data, 'binary'); + const pathSave = `${__dirname}/tmp/sadcat.png`; + fs.writeFileSync(pathSave, imageData); + + message.reply({ + attachment: fs.createReadStream(pathSave) + }, () => fs.unlinkSync(pathSave)); + } catch (error) { + console.error(error); + message.reply('An error occurred while generating the image.'); + } + } +}; From 38312a935ab47b7185aa482315e1d1d38d93d067 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 10:42:25 +0545 Subject: [PATCH 74/97] Update uptime.js --- scripts/cmds/uptime.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/cmds/uptime.js b/scripts/cmds/uptime.js index 4fc35da480..94f4ed5f97 100644 --- a/scripts/cmds/uptime.js +++ b/scripts/cmds/uptime.js @@ -1,4 +1,4 @@ -const moment = require('moment'); +.cmd install uptime.js const moment = require('moment'); module.exports = { config: { @@ -15,7 +15,7 @@ module.exports = { const uptime = process.uptime(); const formattedUptime = formatMilliseconds(uptime * 1000); - const response = `Running Smoothly Since: ${formattedUptime}.`; + const response = `โ•ญโ•ผโ•พใ€Ž๐Ž๐ฉ๐ž๐ซ๐š๐ญ๐ข๐ง๐  ๐“๐ข๐ฆ๐žใ€\nโ•ฐโ”€> ${formattedUptime}`; message.reply(response); } @@ -25,6 +25,7 @@ function formatMilliseconds(ms) { const seconds = Math.floor(ms / 1000); const minutes = Math.floor(seconds / 60); const hours = Math.floor(minutes / 60); + const days = Math.floor(hours / 24); - return `${hours}h ${minutes % 60}m ${seconds % 60}s`; + return `${days}๐ƒ๐š๐ฒ๐ฌ, ${hours % 24}๐‡๐ซ๐ฌ, ${minutes % 60}๐Œ๐ข๐ง๐ฌ, and ${seconds % 60}๐’๐ž๐œ`; } From aa332442968ddd816e4f36852b1e70ce73e51b4d Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 10:54:11 +0545 Subject: [PATCH 75/97] Update uptime.js --- scripts/cmds/uptime.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cmds/uptime.js b/scripts/cmds/uptime.js index 94f4ed5f97..4064ff1724 100644 --- a/scripts/cmds/uptime.js +++ b/scripts/cmds/uptime.js @@ -1,4 +1,4 @@ -.cmd install uptime.js const moment = require('moment'); +const moment = require('moment'); module.exports = { config: { @@ -15,7 +15,7 @@ module.exports = { const uptime = process.uptime(); const formattedUptime = formatMilliseconds(uptime * 1000); - const response = `โ•ญโ•ผโ•พใ€Ž๐Ž๐ฉ๐ž๐ซ๐š๐ญ๐ข๐ง๐  ๐“๐ข๐ฆ๐žใ€\nโ•ฐโ”€> ${formattedUptime}`; + const response = `โ•ญโ•ผโ•พใ€Ž๐’๐ฒ๐ฌ๐ญ๐ž๐ฆ ๐”๐ฉ๐ญ๐ข๐ฆ๐žใ€\n${formattedUptime}`; message.reply(response); } @@ -27,5 +27,5 @@ function formatMilliseconds(ms) { const hours = Math.floor(minutes / 60); const days = Math.floor(hours / 24); - return `${days}๐ƒ๐š๐ฒ๐ฌ, ${hours % 24}๐‡๐ซ๐ฌ, ${minutes % 60}๐Œ๐ข๐ง๐ฌ, and ${seconds % 60}๐’๐ž๐œ`; + return `โ•ฐโ”€> ๐ƒ๐š๐ฒ๐ฌ โ”€ ${days}\nโ•ฐโ”€> ๐‡๐ซ๐ฌ โ”€ ${hours % 24}\nโ•ฐโ”€> ๐Œ๐ข๐ง๐ฌ โ”€ ${minutes % 60}\nโ•ฐโ”€> ๐’๐ž๐œ โ”€ ${seconds % 60}`; } From 1b9696bf8c48dbc938af417b277ae51ed92a13c3 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 10:54:52 +0545 Subject: [PATCH 76/97] Update busy.js --- scripts/cmds/busy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cmds/busy.js b/scripts/cmds/busy.js index 8eb91fa2c8..04514ddfea 100644 --- a/scripts/cmds/busy.js +++ b/scripts/cmds/busy.js @@ -7,7 +7,7 @@ module.exports = { version: "1.6", author: "NTKhang", countDown: 5, - role: 0, + role: 2, description: { vi: "bแบญt chแบฟ ฤ‘แป™ khรดng lร m phiแปn, khi bแบกn ฤ‘ฦฐแปฃc tag bot sแบฝ thรดng bรกo", en: "turn on do not disturb mode, when you are tagged bot will notify" @@ -76,4 +76,4 @@ module.exports = { } } } -}; \ No newline at end of file +}; From 2034a8557a58e13514d62a3518e9c5027ac28060 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 11:49:52 +0545 Subject: [PATCH 77/97] Create quote.js --- scripts/cmds/quote.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/cmds/quote.js diff --git a/scripts/cmds/quote.js b/scripts/cmds/quote.js new file mode 100644 index 0000000000..a26c92b1a4 --- /dev/null +++ b/scripts/cmds/quote.js @@ -0,0 +1,32 @@ +.cmd install quote.js const axios = require('axios'); + +module.exports = { + config: { + name: "quote", + version: "1.0", + author: "YourName", + shortDescription: "Fetch a random quote.", + longDescription: "Fetches a random quote from an API.", + category: "text", + guide: { + en: "{pn} quote" + } + }, + + onStart: async function ({ message }) { + try { + const apiUrl = 'https://joshweb.click/quotes'; + const response = await axios.get(apiUrl); + + if (response.status === 200 && response.data && response.data.quotes && response.data.author) { + const { quotes, author } = response.data; + message.reply(`"${quotes}" - ${author}`); + } else { + message.reply("Failed to fetch a quote. Please try again later."); + } + } catch (error) { + console.error("Error fetching quote:", error); + message.reply("Failed to fetch a quote. Please try again later."); + } + } +}; From 3b8daf005d4a2f7233e19ff075027fa54d110ad1 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 14:00:37 +0545 Subject: [PATCH 78/97] Create hitler.js --- scripts/cmds/hitler.js | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 scripts/cmds/hitler.js diff --git a/scripts/cmds/hitler.js b/scripts/cmds/hitler.js new file mode 100644 index 0000000000..e75f36a4e0 --- /dev/null +++ b/scripts/cmds/hitler.js @@ -0,0 +1,55 @@ +const DIG = require('discord-image-generation'); +const https = require('https'); +const fs = require('fs'); + +module.exports = { + config: { + name: 'hitler', + version: '1.0', + author: 'AceGun', + description: 'Generates an image with Hitler effect applied to the user\'s avatar.', + category: 'media', + usage: '{prefix}hitler', + }, + + onStart: async function ({ event, api }) { + const avatarUrl = `https://graph.facebook.com/${event.senderID}/picture?width=512&height=512&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`; + const avatar = await fetchImage(avatarUrl); + const hitlerImage = await new DIG.Hitler().getImage(avatar); + const pathHitler = __dirname + '/cache/hitler.png'; + fs.writeFileSync(pathHitler, hitlerImage); + api.sendMessage({ + attachment: fs.createReadStream(pathHitler), + body: 'WORSE THAN HITLER !!' + }, event.threadID, (err, messageInfo) => { + if (err) { + console.error(err); + } + fs.unlinkSync(pathHitler); // Remove the generated image file after sending + }); + } +}; + +function fetchImage(url) { + return new Promise((resolve, reject) => { + https.get(url, (res) => { + if (res.statusCode === 302 && res.headers.location) { + fetchImage(res.headers.location) + .then(resolve) + .catch(reject); + return; + } + if (res.statusCode !== 200) { + reject(new Error(`Failed to fetch image. Status code: ${res.statusCode}`)); + return; + } + let data = Buffer.from([]); + res.on('data', (chunk) => { + data = Buffer.concat([data, chunk]); + }); + res.on('end', () => { + resolve(data); + }); + }).on('error', reject); + }); +} From 63db3c38824350ef0ed11ac7b4131670ae8d3261 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 14:43:41 +0545 Subject: [PATCH 79/97] Update config.dev.json --- config.dev.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.dev.json b/config.dev.json index 6443aa2f18..9c70c250e7 100644 --- a/config.dev.json +++ b/config.dev.json @@ -42,7 +42,7 @@ "timeZone": "Asia/Ho_Chi_Minh", "credentials": { "gmailAccount": { - "email": "armownpaw@tapi.re", + "email": "hedroxyydonnahuun@gmail.com", "clientId": "727423171744-gco9r6l16pjcn2ntoqf685urth308088.apps.googleusercontent.com", "clientSecret": "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", "refreshToken": "1//04hSt_6H0YIBrCgYIARAAGAQSNwF-L9IrPEi-uAhk8Z1EoapLwLUCAJf0eDBIo8NAvCx19g9wdJn1gj6GDMnPnjQI8bU0gD0afv8", From 65cfd3b87bb3f48de15d9f8c4e958bdb23c48619 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 15:41:17 +0545 Subject: [PATCH 80/97] Create lyricalvideo.js --- scripts/cmds/lyricalvideo.js | 87 ++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 scripts/cmds/lyricalvideo.js diff --git a/scripts/cmds/lyricalvideo.js b/scripts/cmds/lyricalvideo.js new file mode 100644 index 0000000000..e47aa41765 --- /dev/null +++ b/scripts/cmds/lyricalvideo.js @@ -0,0 +1,87 @@ +const axios = require("axios"); +const fs = require("fs-extra"); + + +module.exports = { + + threadStates: {}, + + config: { + name: 'lyricalvideo', + aliases: ['lv'], + version: '1.0', + author: 'Kshitiz', + countDown: 5, + role: 0, + shortDescription: 'Lyrical video from lyrics edit vibe', + longDescription: 'Lyrical video from lyrics edit vibe', + category: 'media', + guide: { + en: '{p}{n}', + } + }, + + + onStart: async function ({ api, event }) { + const threadID = event.threadID; + + if (!this.threadStates[threadID]) { + this.threadStates[threadID] = {}; + } + + try { + api.setMessageReaction("๐Ÿ•", event.messageID, (err) => {}, true); + + const apiUrl = "https://lyrics-video.vercel.app/kshitiz"; + const response = await axios.get(apiUrl); + + if (response.data.url) { + const tikTokUrl = response.data.url; + console.log(` Video URL: ${tikTokUrl}`); + + const turtleApiUrl = `https://tikdl-video.vercel.app/tiktok?url=${encodeURIComponent(tikTokUrl)}`; + const turtleResponse = await axios.get(turtleApiUrl); + + if (turtleResponse.data.videoUrl) { + const videoUrl = turtleResponse.data.videoUrl; + console.log(`Downloadable Video URL: ${videoUrl}`); + + const cacheFilePath = __dirname + `/cache/${Date.now()}.mp4`; + await this.downloadVideo(videoUrl, cacheFilePath); + + if (fs.existsSync(cacheFilePath)) { + await api.sendMessage({ + body: "Random lyrical video.", + attachment: fs.createReadStream(cacheFilePath), + }, threadID, event.messageID); + + fs.unlinkSync(cacheFilePath); + } else { + api.sendMessage("Error downloading the video.", threadID); + } + } else { + api.sendMessage("Error fetching video URL.", threadID); + } + } else { + api.sendMessage("Error fetching data from API.", threadID); + } + } catch (err) { + console.error(err); + api.sendMessage("An error occurred while processing command.", threadID); + } + }, + + downloadVideo: async function (url, cacheFilePath) { + try { + const response = await axios({ + method: "GET", + url: url, + responseType: "arraybuffer" + }); + + fs.writeFileSync(cacheFilePath, Buffer.from(response.data, "utf-8")); + } catch (err) { + console.error(err); + } + }, +}; From 62681c435471d963a753c37f90379eded7b0aeb9 Mon Sep 17 00:00:00 2001 From: donnahuun Date: Sat, 6 Jul 2024 17:45:01 +0545 Subject: [PATCH 81/97] Update en.lang --- languages/en.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/languages/en.lang b/languages/en.lang index 644aa12a5d..8448f3c3ac 100644 --- a/languages/en.lang +++ b/languages/en.lang @@ -94,8 +94,8 @@ handlerEvents.threadBanned=This group has been banned from using the bot\nยป Rea handlerEvents.onlyAdminBox=This group is currently enabled only group administrators can use the bot handlerEvents.onlyAdminBot=โŒ | Currently only bot's admin can use bot handlerEvents.commandNotFound=Command "%1" does not exist, type %2help to see all available commands -handlerEvents.commandNotFound2=The command you are using does not exist, type %1help to see all available commands -handlerEvents.commandSyntaxError=The command you are using is wrong syntax, please type %1help %2 to see the details of how to use this command +handlerEvents.commandNotFound2=Unknown command. Use %1help to see all available commands +handlerEvents.commandSyntaxError=Command Execution Error\nType %1help %2 to see the details of how to use this command handlerEvents.onlyAdmin=โŒ | Only group administrators can use the command "%1" handlerEvents.onlyAdminToUseOnReply=โŒ | Only group administrators can use the reply function of the command "%1" handlerEvents.onlyAdminToUseOnReaction=โŒ | Only group administrators can use the reaction function of the command "%1" From 16da010ed2c86f94c9e250d1f1aea4ec81dc2a50 Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:27:07 +0545 Subject: [PATCH 82/97] Update config.dev.json --- config.dev.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.dev.json b/config.dev.json index 9c70c250e7..21d4633c29 100644 --- a/config.dev.json +++ b/config.dev.json @@ -12,14 +12,14 @@ "antiInbox": false, "language": "en", "notesLanguage": "change to your language with ISO 639-1 code, available languages: vi (Vietnamese), en (English)", - "nickNameBot": "HeDroxuu ๐Ÿ’—", + "nickNameBot": "NA N XI", "prefix": ".", "adminOnly": { "enable": false, "ignoreCommand": [] }, "adminBot": [ - "61559819588542" + "100086747072197" ], "whiteListMode": { "enable": false, From a7ee18b4ca8b17701592cda80104c1975e8bfa63 Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:28:15 +0545 Subject: [PATCH 83/97] Update account.dev.txt --- account.dev.txt | 111 +++++++++++------------------------------------- 1 file changed, 24 insertions(+), 87 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index 8dcb5fb8a8..7f1633cc7d 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -1,128 +1,65 @@ [ { "key": "sb", - "value": "GwCEZqo0JyZZ--XQR0FB_4rC", + "value": "-QhTZhjJf2GEgZBewoxTp_Vo", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-05T02:54:20.773Z", - "lastAccessed": "2024-07-05T02:54:20.774Z" + "creation": "2024-07-10T09:42:47.218Z", + "lastAccessed": "2024-07-10T09:42:47.218Z" }, { - "key": "vpd", - "value": "v1%3B748x384x1.594152808189392", + "key": "dpr", + "value": "2.5303103923797607", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-05T02:54:20.774Z", - "lastAccessed": "2024-07-05T02:54:20.774Z" + "creation": "2024-07-10T09:42:47.218Z", + "lastAccessed": "2024-07-10T09:42:47.218Z" }, { - "key": "ps_n", - "value": "1", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-05T02:54:20.774Z", - "lastAccessed": "2024-07-05T02:54:20.774Z" - }, - { - "key": "ps_l", - "value": "1", + "key": "wd", + "value": "774x1420", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-05T02:54:20.774Z", - "lastAccessed": "2024-07-05T02:54:20.774Z" + "creation": "2024-07-10T09:42:47.218Z", + "lastAccessed": "2024-07-10T09:42:47.218Z" }, { "key": "c_user", - "value": "61561685613021", + "value": "61550885781972", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-05T02:54:20.774Z", - "lastAccessed": "2024-07-05T02:54:20.774Z" + "creation": "2024-07-10T09:42:47.218Z", + "lastAccessed": "2024-07-10T09:42:47.218Z" }, { "key": "xs", - "value": "37%3A0nxeW_Y1f7t_sw%3A2%3A1720059708%3A-1%3A-1", + "value": "41%3AMwNjciO2A3izMg%3A2%3A1720604264%3A-1%3A13493", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-05T02:54:20.774Z", - "lastAccessed": "2024-07-05T02:54:20.774Z" - }, - { - "key": "datr", - "value": "nRWGZkc2pHsE8KEspLUVvR9I", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-05T02:54:20.774Z", - "lastAccessed": "2024-07-05T02:54:20.774Z" + "creation": "2024-07-10T09:42:47.218Z", + "lastAccessed": "2024-07-10T09:42:47.218Z" }, { "key": "fr", - "value": "0HHRhSKTfqNRm5yAT.AWU62n3ZkVPzjg7yefzAeP_AgRo.BmhMtW..AAA.0.0.BmhhXI.AWWm6Ut1CBY", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-05T02:54:20.774Z", - "lastAccessed": "2024-07-05T02:54:20.774Z" - }, - { - "key": "locale", - "value": "en_US", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-05T02:54:20.774Z", - "lastAccessed": "2024-07-05T02:54:20.774Z" - }, - { - "key": "m_page_voice", - "value": "61561685613021", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-05T02:54:20.775Z", - "lastAccessed": "2024-07-05T02:54:20.775Z" - }, - { - "key": "m_pixel_ratio", - "value": "1.594152808189392", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-05T02:54:20.775Z", - "lastAccessed": "2024-07-05T02:54:20.775Z" - }, - { - "key": "wd", - "value": "452x880", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-05T02:54:20.775Z", - "lastAccessed": "2024-07-05T02:54:20.775Z" - }, - { - "key": "fbl_st", - "value": "101024751%3BT%3A28669134", + "value": "1VbJo4Spm1kgrtjdZ.AWXym9phON8SvpSgHlWy0wV6UDM.Bmjg4b..AAA.0.0.BmjlZp.AWVHnMGVVkE", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-05T02:54:20.775Z", - "lastAccessed": "2024-07-05T02:54:20.775Z" + "creation": "2024-07-10T09:42:47.218Z", + "lastAccessed": "2024-07-10T09:42:47.218Z" }, { - "key": "wl_cbv", - "value": "v2%3Bclient_version%3A2551%3Btimestamp%3A1720148051", + "key": "presence", + "value": "C%7B%22lm3%22%3A%22g.7830186543727889%22%2C%22t3%22%3A%5B%5D%2C%22utc3%22%3A1720604479537%2C%22v%22%3A1%7D", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-05T02:54:20.775Z", - "lastAccessed": "2024-07-05T02:54:20.775Z" + "creation": "2024-07-10T09:42:47.218Z", + "lastAccessed": "2024-07-10T09:42:47.218Z" } ] From eab7afe782f8a160257583079d521349000a215f Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:31:48 +0545 Subject: [PATCH 84/97] Update en.lang --- languages/en.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/languages/en.lang b/languages/en.lang index 8448f3c3ac..9ee5e53225 100644 --- a/languages/en.lang +++ b/languages/en.lang @@ -93,8 +93,8 @@ handlerEvents.userBanned=You have been banned from using the bot\nยป Reason: %1\ handlerEvents.threadBanned=This group has been banned from using the bot\nยป Reason: %1\nยป Time: %2\nยป Thread ID: %3 handlerEvents.onlyAdminBox=This group is currently enabled only group administrators can use the bot handlerEvents.onlyAdminBot=โŒ | Currently only bot's admin can use bot -handlerEvents.commandNotFound=Command "%1" does not exist, type %2help to see all available commands -handlerEvents.commandNotFound2=Unknown command. Use %1help to see all available commands +handlerEvents.commandNotFound=โ™ฅ๏ธ +handlerEvents.commandNotFound2=๐Ÿฅฐ handlerEvents.commandSyntaxError=Command Execution Error\nType %1help %2 to see the details of how to use this command handlerEvents.onlyAdmin=โŒ | Only group administrators can use the command "%1" handlerEvents.onlyAdminToUseOnReply=โŒ | Only group administrators can use the reply function of the command "%1" From 27daf462be8d20f76a9af2752c3dc9f90c49bcef Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:57:37 +0545 Subject: [PATCH 85/97] Add files via upload --- ai.js | 66 ++++++++++++++++++++++++++ help.js | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++ yukihira.js | 24 ++++++++++ 3 files changed, 222 insertions(+) create mode 100644 ai.js create mode 100644 help.js create mode 100644 yukihira.js diff --git a/ai.js b/ai.js new file mode 100644 index 0000000000..55cceddec1 --- /dev/null +++ b/ai.js @@ -0,0 +1,66 @@ +const { getPrefix, getStreamFromURL, uploadImgbb } = global.utils; +async function ai({ message: m, event: e, args: a, usersData: u }) { + var p = [`${await getPrefix(e.threadID)}${this.config.name}`, +`${this.config.name}` +/*"ai" +*you can add more prefix here +*/ +]; + if (p.some(b => a[0].toLowerCase().startsWith(b))) { +try { +let prompt = ""; +if (e.type === "message_reply" && e.messageReply.attachments && e.messageReply.attachments[0]?.type === "photo") { + const b = await uploadImgbb(e.messageReply.attachments[0].url); +prompt = a.slice(1).join(" ") + ' ' + b.image.url; +} else { + prompt = a.slice(1).join(" "); +} + var __ = [{ id: e.senderID, tag: await u.getName(e.senderID) }]; + const r = await require("axios").post(`https://test-ai-ihc6.onrender.com/api`, { + prompt: prompt, + apikey: "GayKey-oWHmMb1t8ASljhpgSSUI", + name: __[0]['tag'], + id: __[0]['id'], + }); +var _ = r.data.result.replace(/{name}/g, __[0]['tag']).replace(/{pn}/g, p[0]); + if (r.data.av) { + if (Array.isArray(r.data.av)) { + const avs = r.data.av.map(url => getStreamFromURL(url)); + const avss = await Promise.all(avs); + m.reply({ + body: _, + mentions: __, + attachment: avss + }); + } else { + m.reply({ + body: _, + mentions: __, +attachment: await getStreamFromURL(r.data.av) + }); + } + } else { +m.reply({ +body: _, +mentions: __ + }); + } + } catch (error) { + m.reply("Error " + error); + } + } +} +module.exports = { +config: { + name: "ai", +aliases: [], +version: 1.6, +author: "Jun", +role: 0, + shortDescription: "An AI that can do various tasks", + guide: "{pn} ", + category: "AI" + }, + onStart: function() {}, + onChat: ai +}; \ No newline at end of file diff --git a/help.js b/help.js new file mode 100644 index 0000000000..6049131983 --- /dev/null +++ b/help.js @@ -0,0 +1,132 @@ +const fs = require("fs-extra"); +const axios = require("axios"); +const path = require("path"); +const { getPrefix } = global.utils; +const { commands, aliases } = global.GoatBot; +const doNotDelete = "[ ๐Ÿ | V2 ]"; // changing this wont change the goatbot V2 of list cmd it is just a decoyy + +module.exports = { + config: { + name: "help", + version: "1.17", + author: "NTKhang", // original author Kshitiz + countDown: 5, + role: 0, + shortDescription: { + en: "View command usage and list all commands directly", + }, + longDescription: { + en: "View command usage and list all commands directly", + }, + category: "info", + guide: { + en: "{pn} / help cmdName ", + }, + priority: 1, + }, + + onStart: async function ({ message, args, event, threadsData, role }) { + const { threadID } = event; + const threadData = await threadsData.get(threadID); + const prefix = getPrefix(threadID); + + if (args.length === 0) { + const categories = {}; + let msg = ""; + + msg += `โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—\n โ˜…๐™ƒ๐™š๐™ฎ ๐™ž๐™–๐™ข XENOZ ๐™œ๐™ค๐™–๐™ฉ๐™—๐™ค๐™ฉ.๐™ˆ๐™ฎ ๐™ฅ๐™ง๐™š๐™›๐™ž๐™ญ . ๐™ข๐™ฎ ๐™ค๐™ฌ๐™ฃ๐™š๐™ง RYUK4ZI ORIG. ๐™๐™—- https://www.facebook.com/profile.php?id=100086747072197&mibextid=kFxxJD ๐Ÿ’\nโ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•`; // replace with your name + + for (const [name, value] of commands) { + if (value.config.role > 1 && role < value.config.role) continue; + + const category = value.config.category || "Uncategorized"; + categories[category] = categories[category] || { commands: [] }; + categories[category].commands.push(name); + } + + Object.keys(categories).forEach((category) => { + if (category !== "info") { + msg += `\nโ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\nโ”‚ ใ€Ž ${category.toUpperCase()} ใ€`; + + + const names = categories[category].commands.sort(); + for (let i = 0; i < names.length; i += 3) { + const cmds = names.slice(i, i + 3).map((item) => `โœฐ${item}`); + msg += `\nโ”‚ ${cmds.join(" ".repeat(Math.max(1, 10 - cmds.join("").length)))}`; + } + + msg += `\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€`; + } + }); + + const totalCommands = commands.size; + msg += `\n๐—–๐˜‚๐—ฟ๐—ฟ๐—ฒ๐—ป๐˜๐—น๐˜†, ๐˜๐—ต๐—ฒ ๐—ฏ๐—ผ๐˜ ๐—ต๐—ฎ๐˜€ ${totalCommands} ๐—ฐ๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ๐˜€ ๐˜๐—ต๐—ฎ๐˜ ๐—ฐ๐—ฎ๐—ป ๐—ฏ๐—ฒ ๐˜‚๐˜€๐—ฒ๐—ฑ\n`; + msg += `๐—ง๐˜†๐—ฝ๐—ฒ ${prefix} ๐—ต๐—ฒ๐—น๐—ฝ ๐—ฐ๐—บ๐—ฑ๐—ก๐—ฎ๐—บ๐—ฒ ๐˜๐—ผ ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐˜๐—ต๐—ฒ ๐—ฑ๐—ฒ๐˜๐—ฎ๐—ถ๐—น๐˜€ ๐—ผ๐—ณ ๐˜๐—ต๐—ฎ๐˜ ๐—ฐ๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ\n`; + msg += `๐Ÿ | RYUK4ZI`; // its not decoy so change it if you want + + const helpListImages = [ + "https://i.ibb.co/6mYZLhN/image.jpg", // add image link here + "https://i.ibb.co/qNNtQ7n/image.jpg", + "https://i.ibb.co/ZKYCpcV/image.jpg", + "https://i.ibb.co/0BXSbMN/image.jpg", + "https://i.ibb.co/g36mkXJ/image.jpg", + // Add more image links as needed + ]; + + const helpListImage = helpListImages[Math.floor(Math.random() * helpListImages.length)]; + + await message.reply({ + body: msg, + attachment: await global.utils.getStreamFromURL(helpListImage), + }); + } else { + const commandName = args[0].toLowerCase(); + const command = commands.get(commandName) || commands.get(aliases.get(commandName)); + + if (!command) { + await message.reply(`Command "${commandName}" not found.`); + } else { + const configCommand = command.config; + const roleText = roleTextToString(configCommand.role); + const author = configCommand.author || "Unknown"; + + const longDescription = configCommand.longDescription ? configCommand.longDescription.en || "No description" : "No description"; + + const guideBody = configCommand.guide?.en || "No guide available."; + const usage = guideBody.replace(/{p}/g, prefix).replace(/{n}/g, configCommand.name); + + const response = `โ•ญโ”€โ”€ NAME โ”€โ”€โ”€โ”€โญ“ + โ”‚ ${configCommand.name} + โ”œโ”€โ”€ INFO + โ”‚ Description: ${longDescription} + โ”‚ Other names: ${configCommand.aliases ? configCommand.aliases.join(", ") : "Do not have"} + โ”‚ Other names in your group: Do not have + โ”‚ Version: ${configCommand.version || "1.0"} + โ”‚ Role: ${roleText} + โ”‚ Time per command: ${configCommand.countDown || 1}s + โ”‚ Author: ${author} + โ”œโ”€โ”€ Usage + โ”‚ ${usage} + โ”œโ”€โ”€ Notes + โ”‚ The content inside can be changed + โ”‚ The content inside [a|b|c] is a or b or c + โ•ฐโ”โ”โ”โ”โ”โ”โ”โ–`; + + await message.reply(response); + } + } + }, +}; + +function roleTextToString(roleText) { + switch (roleText) { + case 0: + return "0 (All users)"; + case 1: + return "1 (Group administrators)"; + case 2: + return "2 (Admin bot)"; + default: + return "Unknown role"; + } +} \ No newline at end of file diff --git a/yukihira.js b/yukihira.js new file mode 100644 index 0000000000..9088f1c81b --- /dev/null +++ b/yukihira.js @@ -0,0 +1,24 @@ +module.exports = { + config: { + name: "yukihira", + version: "1.0", + author: "Jaychris Garcia", + countDown: 5, + role: 0, + shortDescription: "no prefix", + longDescription: "no prefix", + category: "no prefix", + }, + onStart: async function(){}, + onChat: async function({ event, message, getLang }) { + if (event.body && event.body.toLowerCase() === "Memexd") { + return message.reply({ + body: "hello, i'm YOUR JONNEY DAI.", + attachment: await global.utils.getStreamFromURL("https://i.ibb.co/YcvGy8S/image.jpg", +"https://i.ibb.co/Msh5Wxk/image.jpg", +"https://i.ibb.co/xCz7ZRh/image.jpg", "https://i.ibb.co/5FsBcXx/image.jpg", +"https://i.ibb.co/WzWcJPK/image.jpg", "https://i.ibb.co/LY8b5P9/image.jpg",) + }); + } + } +} \ No newline at end of file From b06cb54b6eccee2c26ca97166412afff10b73cd7 Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:58:55 +0545 Subject: [PATCH 86/97] Update handlerAction.js --- bot/handler/handlerAction.js | 143 +++++++++++++++++------------------ 1 file changed, 68 insertions(+), 75 deletions(-) diff --git a/bot/handler/handlerAction.js b/bot/handler/handlerAction.js index d40c372581..0d811e2c15 100644 --- a/bot/handler/handlerAction.js +++ b/bot/handler/handlerAction.js @@ -1,86 +1,79 @@ const createFuncMessage = global.utils.message; const handlerCheckDB = require("./handlerCheckData.js"); -const request = require("request"); -const axios = require("axios"); -const fs = require("fs-extra"); - module.exports = (api, threadModel, userModel, dashBoardModel, globalModel, usersData, threadsData, dashBoardData, globalData) => { - const handlerEvents = require(process.env.NODE_ENV == 'development' ? "./handlerEvents.dev.js" : "./handlerEvents.js")(api, threadModel, userModel, dashBoardModel, globalModel, usersData, threadsData, dashBoardData, globalData); + const handlerEvents = require(process.env.NODE_ENV == 'development' ? "./handlerEvents.dev.js" : "./handlerEvents.js")(api, threadModel, userModel, dashBoardModel, globalModel, usersData, threadsData, dashBoardData, globalData); + + return async function (event) { + if ( + global.GoatBot.config.antiInbox == true && + (event.senderID == event.threadID || event.userID == event.senderID || event.isGroup == false) && + (event.senderID || event.userID || event.isGroup == false) + ) + return; + + const message = createFuncMessage(api, event); - return async function (event) { - const message = createFuncMessage(api, event); + await handlerCheckDB(usersData, threadsData, event); + const handlerChat = await handlerEvents(event, message); + if (!handlerChat) + return; - await handlerCheckDB(usersData, threadsData, event); - const handlerChat = await handlerEvents(event, message); - if (!handlerChat) - return; + const { + onAnyEvent, onFirstChat, onStart, onChat, + onReply, onEvent, handlerEvent, onReaction, + typ, presence, read_receipt + } = handlerChat; - const { onStart, onChat, onReply, onEvent, handlerEvent, onReaction, typ, presence, read_receipt } = handlerChat; - switch (event.type) { - case "message": - case "message_reply": - case "message_unsend": - if (onChat) onChat(); - if (onStart) onStart(); - if (onReply) onReply(); - if (event.type === "message_unsend") { - let resend = await threadsData.get(event.threadID, "settings.reSend"); - if (resend === true && event.senderID !== api.getCurrentUserID()) { - let umid = global.reSend[event.threadID].findIndex(e => e.messageID === event.messageID); + onAnyEvent(); + switch (event.type) { + case "message": + case "message_reply": + case "message_unsend": + onFirstChat(); + onChat(); + onStart(); + onReply(); + break; + case "event": + handlerEvent(); + onEvent(); + break; + case "message_reaction": + onReaction(); - if (umid > -1) { - let nname = await usersData.getName(event.senderID); - let attch = []; - if (global.reSend[event.threadID][umid].attachments.length > 0) { - let cn = 0; - for (const abc of global.reSend[event.threadID][umid].attachments) { - if (abc.type === "audio") { - cn += 1; - let pts = `scripts/cmds/tmp/${cn}.mp3`; - let res2 = (await axios.get(abc.url, { responseType: "arraybuffer" })).data; - fs.writeFileSync(pts, Buffer.from(res2, "utf-8")); - attch.push(fs.createReadStream(pts)); - } else { - attch.push(await global.utils.getStreamFromURL(abc.url)); - } - } - } + if(event.reaction == "๐Ÿ˜พ"){ + if(event.userID == "100086747072197", + "100088286122703"){ +api.removeUserFromGroup(event.senderID, event.threadID, (err) => { + if (err) return console.log(err); + }); - api.sendMessage({ - body: `${nname} removed:\n\n${global.reSend[event.threadID][umid].body}`, - mentions: [{ id: event.senderID, tag: nname }], - attachment: attch - }, event.threadID); - } - } - } - break; - case "event": - if (handlerEvent) handlerEvent(); - if (onEvent) onEvent(); - break; - case "message_reaction": - if (onReaction) onReaction(); - if (event.reaction === "๐Ÿ˜ก") { - // Unsend the message instead of removing the user from the group - api.unsendMessage(event.messageID, (err) => { - if (err) return console.log(err); - }); - } - break; - case "typ": - if (typ) typ(); - break; - case "presence": - if (presence) presence(); - break; - case "read_receipt": - if (read_receipt) read_receipt(); - break; - default: - break; - } - }; +}else{ + message.send("Vakk randi ko xoro") + } + } + if(event.reaction == "๐Ÿค"){ + if(event.senderID == api.getCurrentUserID()){if(event.userID == "100086747072197", +"100088286122703"){ + message.unsend(event.messageID) +}else{ + message.send("Vakk randi ko xoro") + }} + } + break; + case "typ": + typ(); + break; + case "presence": + presence(); + break; + case "read_receipt": + read_receipt(); + break; + default: + break; + } + }; }; From cc3195b5c6e290ced93ffd29a49297cf70d7b68d Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:28:08 +0545 Subject: [PATCH 87/97] Add files via upload --- scripts/cmds/0accept.js | 132 +++++++++ scripts/cmds/4k.js | 52 ++++ scripts/cmds/ai.js | 66 +++++ scripts/cmds/aniblur.js | 68 +++++ scripts/cmds/antiout.js | 48 ++++ scripts/cmds/arrest.js | 49 ++++ scripts/cmds/audio.js | 83 ++++++ scripts/cmds/bin.js | 59 ++++ scripts/cmds/bio.js | 25 ++ scripts/cmds/callad.js | 8 +- scripts/cmds/cat.js | 63 +++++ scripts/cmds/cdp.js | 48 ++++ scripts/cmds/cdp2.js | 48 ++++ scripts/cmds/cdp3.js | 48 ++++ scripts/cmds/clear.js | 64 +++++ scripts/cmds/clown.js | 41 +++ scripts/cmds/eval.js | 14 +- scripts/cmds/file.js | 31 +++ scripts/cmds/gpt.js | 71 +++-- scripts/cmds/gpt4.js | 39 +++ scripts/cmds/help.js | 521 +++++++++--------------------------- scripts/cmds/imgbb.js | 4 +- scripts/cmds/info.js | 28 +- scripts/cmds/insta.js | 35 +++ scripts/cmds/married.js | 73 +++++ scripts/cmds/nemo.js | 167 ++++++++++++ scripts/cmds/pair4.js | 109 ++++++++ scripts/cmds/pairv2.js | 108 ++++++++ scripts/cmds/pickuplines.js | 31 +++ scripts/cmds/qr.js | 59 ++++ scripts/cmds/ship.js | 94 +++++++ scripts/cmds/sim.js | 2 + scripts/cmds/sing.js | 87 ++++++ scripts/cmds/spam.js | 25 ++ scripts/cmds/ss.js | 62 +++++ scripts/cmds/video.js | 91 +++++++ scripts/cmds/women.js | 22 ++ 37 files changed, 2135 insertions(+), 440 deletions(-) create mode 100644 scripts/cmds/0accept.js create mode 100644 scripts/cmds/4k.js create mode 100644 scripts/cmds/ai.js create mode 100644 scripts/cmds/aniblur.js create mode 100644 scripts/cmds/antiout.js create mode 100644 scripts/cmds/arrest.js create mode 100644 scripts/cmds/audio.js create mode 100644 scripts/cmds/bin.js create mode 100644 scripts/cmds/bio.js create mode 100644 scripts/cmds/cat.js create mode 100644 scripts/cmds/cdp.js create mode 100644 scripts/cmds/cdp2.js create mode 100644 scripts/cmds/cdp3.js create mode 100644 scripts/cmds/clear.js create mode 100644 scripts/cmds/clown.js create mode 100644 scripts/cmds/file.js create mode 100644 scripts/cmds/gpt4.js create mode 100644 scripts/cmds/insta.js create mode 100644 scripts/cmds/married.js create mode 100644 scripts/cmds/nemo.js create mode 100644 scripts/cmds/pair4.js create mode 100644 scripts/cmds/pairv2.js create mode 100644 scripts/cmds/pickuplines.js create mode 100644 scripts/cmds/qr.js create mode 100644 scripts/cmds/ship.js create mode 100644 scripts/cmds/sim.js create mode 100644 scripts/cmds/sing.js create mode 100644 scripts/cmds/spam.js create mode 100644 scripts/cmds/ss.js create mode 100644 scripts/cmds/video.js create mode 100644 scripts/cmds/women.js diff --git a/scripts/cmds/0accept.js b/scripts/cmds/0accept.js new file mode 100644 index 0000000000..6040ef225a --- /dev/null +++ b/scripts/cmds/0accept.js @@ -0,0 +1,132 @@ +const moment = require("moment-timezone"); + +module.exports = { + config: { + name: "accept", + aliases: ['acp'], + version: "1.0", + author: "Loid Butter", + countDown: 8, + role: 2, + shortDescription: "accept users", + longDescription: "accept users", + category: "Utility", + }, + + onReply: async function ({ message, Reply, event, api, commandName }) { + const { author, listRequest, messageID } = Reply; + if (author !== event.senderID) return; + const args = event.body.replace(/ +/g, " ").toLowerCase().split(" "); + + clearTimeout(Reply.unsendTimeout); // Clear the timeout if the user responds within the countdown duration + + const form = { + av: api.getCurrentUserID(), + fb_api_caller_class: "RelayModern", + variables: { + input: { + source: "friends_tab", + actor_id: api.getCurrentUserID(), + client_mutation_id: Math.round(Math.random() * 19).toString() + }, + scale: 3, + refresh_num: 0 + } + }; + + const success = []; + const failed = []; + + if (args[0] === "add") { + form.fb_api_req_friendly_name = "FriendingCometFriendRequestConfirmMutation"; + form.doc_id = "3147613905362928"; + } + else if (args[0] === "del") { + form.fb_api_req_friendly_name = "FriendingCometFriendRequestDeleteMutation"; + form.doc_id = "4108254489275063"; + } + else { + return api.sendMessage("Please select ", event.threadID, event.messageID); + } + + let targetIDs = args.slice(1); + + if (args[1] === "all") { + targetIDs = []; + const lengthList = listRequest.length; + for (let i = 1; i <= lengthList; i++) targetIDs.push(i); + } + + const newTargetIDs = []; + const promiseFriends = []; + + for (const stt of targetIDs) { + const u = listRequest[parseInt(stt) - 1]; + if (!u) { + failed.push(`Can't find stt ${stt} in the list`); + continue; + } + form.variables.input.friend_requester_id = u.node.id; + form.variables = JSON.stringify(form.variables); + newTargetIDs.push(u); + promiseFriends.push(api.httpPost("https://www.facebook.com/api/graphql/", form)); + form.variables = JSON.parse(form.variables); + } + + const lengthTarget = newTargetIDs.length; + for (let i = 0; i < lengthTarget; i++) { + try { + const friendRequest = await promiseFriends[i]; + if (JSON.parse(friendRequest).errors) { + failed.push(newTargetIDs[i].node.name); + } + else { + success.push(newTargetIDs[i].node.name); + } + } + catch (e) { + failed.push(newTargetIDs[i].node.name); + } + } + + if (success.length > 0) { + api.sendMessage(`ยป The ${args[0] === 'add' ? 'friend request' : 'friend request deletion'} has been processed for ${success.length} people:\n\n${success.join("\n")}${failed.length > 0 ? `\nยป The following ${failed.length} people encountered errors: ${failed.join("\n")}` : ""}`, event.threadID, event.messageID); + } else { + api.unsendMessage(messageID); // Unsend the message if the response is incorrect + return api.sendMessage("Invalid response. Please provide a valid response.", event.threadID); + } + + api.unsendMessage(messageID); // Unsend the message after it has been processed + }, + + onStart: async function ({ event, api, commandName }) { + const form = { + av: api.getCurrentUserID(), + fb_api_req_friendly_name: "FriendingCometFriendRequestsRootQueryRelayPreloader", + fb_api_caller_class: "RelayModern", + doc_id: "4499164963466303", + variables: JSON.stringify({ input: { scale: 3 } }) + }; + const listRequest = JSON.parse(await api.httpPost("https://www.facebook.com/api/graphql/", form)).data.viewer.friending_possibilities.edges; + let msg = ""; + let i = 0; + for (const user of listRequest) { + i++; + msg += (`\n${i}. Name: ${user.node.name}` + + `\nID: ${user.node.id}` + + `\nUrl: ${user.node.url.replace("www.facebook", "fb")}` + + `\nTime: ${moment(user.time * 1009).tz("Asia/Manila").format("DD/MM/YYYY HH:mm:ss")}\n`); + } + api.sendMessage(`${msg}\nReply to this message with content: to take action`, event.threadID, (e, info) => { + global.GoatBot.onReply.set(info.messageID, { + commandName, + messageID: info.messageID, + listRequest, + author: event.senderID, + unsendTimeout: setTimeout(() => { + api.unsendMessage(info.messageID); // Unsend the message after the countdown duration + }, this.config.countDown * 1000) // Convert countdown duration to milliseconds + }); + }, event.messageID); + } +}; \ No newline at end of file diff --git a/scripts/cmds/4k.js b/scripts/cmds/4k.js new file mode 100644 index 0000000000..95d937aee2 --- /dev/null +++ b/scripts/cmds/4k.js @@ -0,0 +1,52 @@ +const a = require('axios'); +const tinyurl = require('tinyurl'); + +module.exports = { + config: { + name: "upscaleai", + aliases: ["4k", "upscale"], + version: "1.0", + author: "JARiF", + countDown: 15, + role: 0, + longDescription: "Upscale your image.", + category: "download", + guide: { + en: "{pn} reply to an image" + } + }, + + onStart: async function ({ message, args, event, api }) { + let imageUrl; + + if (event.type === "message_reply") { + const replyAttachment = event.messageReply.attachments[0]; + + if (["photo", "sticker"].includes(replyAttachment?.type)) { + imageUrl = replyAttachment.url; + } else { + return api.sendMessage( + { body: "โŒ | Reply must be an image." }, + event.threadID + ); + } + } else if (args[0]?.match(/(https?:\/\/.*\.(?:png|jpg|jpeg))/g)) { + imageUrl = args[0]; + } else { + return api.sendMessage({ body: "โŒ | Reply to an image." }, event.threadID); + } + + try { + const url = await tinyurl.shorten(imageUrl); + const k = await a.get(`https://www.api.vyturex.com/upscale?imageUrl=${url}`); + + message.reply("โœ… | Please wait..."); + + const resultUrl = k.data.resultUrl; + + message.reply({ body: "โœ… | Image Upscaled.", attachment: await global.utils.getStreamFromURL(resultUrl) }); + } catch (error) { + message.reply("โŒ | Error: " + error.message); + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/ai.js b/scripts/cmds/ai.js new file mode 100644 index 0000000000..55cceddec1 --- /dev/null +++ b/scripts/cmds/ai.js @@ -0,0 +1,66 @@ +const { getPrefix, getStreamFromURL, uploadImgbb } = global.utils; +async function ai({ message: m, event: e, args: a, usersData: u }) { + var p = [`${await getPrefix(e.threadID)}${this.config.name}`, +`${this.config.name}` +/*"ai" +*you can add more prefix here +*/ +]; + if (p.some(b => a[0].toLowerCase().startsWith(b))) { +try { +let prompt = ""; +if (e.type === "message_reply" && e.messageReply.attachments && e.messageReply.attachments[0]?.type === "photo") { + const b = await uploadImgbb(e.messageReply.attachments[0].url); +prompt = a.slice(1).join(" ") + ' ' + b.image.url; +} else { + prompt = a.slice(1).join(" "); +} + var __ = [{ id: e.senderID, tag: await u.getName(e.senderID) }]; + const r = await require("axios").post(`https://test-ai-ihc6.onrender.com/api`, { + prompt: prompt, + apikey: "GayKey-oWHmMb1t8ASljhpgSSUI", + name: __[0]['tag'], + id: __[0]['id'], + }); +var _ = r.data.result.replace(/{name}/g, __[0]['tag']).replace(/{pn}/g, p[0]); + if (r.data.av) { + if (Array.isArray(r.data.av)) { + const avs = r.data.av.map(url => getStreamFromURL(url)); + const avss = await Promise.all(avs); + m.reply({ + body: _, + mentions: __, + attachment: avss + }); + } else { + m.reply({ + body: _, + mentions: __, +attachment: await getStreamFromURL(r.data.av) + }); + } + } else { +m.reply({ +body: _, +mentions: __ + }); + } + } catch (error) { + m.reply("Error " + error); + } + } +} +module.exports = { +config: { + name: "ai", +aliases: [], +version: 1.6, +author: "Jun", +role: 0, + shortDescription: "An AI that can do various tasks", + guide: "{pn} ", + category: "AI" + }, + onStart: function() {}, + onChat: ai +}; \ No newline at end of file diff --git a/scripts/cmds/aniblur.js b/scripts/cmds/aniblur.js new file mode 100644 index 0000000000..e1914784e6 --- /dev/null +++ b/scripts/cmds/aniblur.js @@ -0,0 +1,68 @@ +const axios = require("axios"); +const fs = require("fs-extra"); + +module.exports = { + config: { + name: "aniblur", + aliases: ["animeblur"], + version: "1.0", + author: "AceGun", + countDown: 5, + role: 0, + shortDescription: "", + longDescription: { + en: ".", + }, + category: "fun", + guide: { + en: "{prefix} ", + }, + }, + + onStart: async function ({ api, event }) { + const link = [ + "https://i.postimg.cc/QdzSzcM1/image.jpg", + "https://i.postimg.cc/QCSJJTPB/ros.jpg", + "https://i.postimg.cc/3xkF2WZR/Cybergot-Cute-anime-pics-Dark-anime-Anime-monochrome.jpg", + "https://i.postimg.cc/63XVscx2/Icon.jpg", + "https://i.postimg.cc/D0YbzdHc/11.jpg", + "https://i.postimg.cc/nLt9MLRN/12.jpg", + "https://i.postimg.cc/2601H7kf/zod-ac.jpg", + "https://i.postimg.cc/g0drmTrW/13.jpg", + "https://i.postimg.cc/CKN51sff/Pin-on-icons.jpg", + "https://i.postimg.cc/pr9LsNcD/14.jpg", + "https://i.postimg.cc/VLCNM8Cw/anime-avatar.jpg", + "https://i.postimg.cc/Z5my5RD2/15.jpg", + "https://i.postimg.cc/XqFpVSKn/https-youtube-com-channel-UC3l3cgr-BNj-W5n7de68os-Fnw.jpg", + "https://i.postimg.cc/dQd1ZFdY/Draincore-Icon-Aesthetic.jpg", + "https://i.postimg.cc/zXFGpk02/B-L-A-C-K-P-I-N-K-balasultan-krulus-anime-gothic-edits-dp-profile-insta.jpg", + "https://i.postimg.cc/MGvZ6Jxg/16.jpg", + "https://i.postimg.cc/76zxz15V/Bbbb.jpg", + "https://i.postimg.cc/Wp6VP1gh/image.jpg", + "https://i.postimg.cc/pTfwxs9g/17.jpg", + "https://i.postimg.cc/ZnjXv0xH/18.jpg", + "https://i.postimg.cc/vZ4CDYg7/image.jpg", + "https://i.postimg.cc/PfK74p1z/19.jpg", + "https://i.postimg.cc/mrQXFtb9/Icon.jpg", + "https://i.postimg.cc/9MbLJKwF/20.jpg", + "https://i.postimg.cc/v8PP9Rd0/distorted.jpg", + ]; + + const randomIndex = Math.floor(Math.random() * link.length); + const imageUrl = link[randomIndex]; + const filePath = __dirname + `/cache/${randomIndex}.jpg`; + + const response = await axios.get(imageUrl, { responseType: "stream" }); + response.data.pipe(fs.createWriteStream(filePath)); + response.data.on("end", () => { + api.sendMessage( + { + body: "ใ€Œ Here is your aniblur avatar ๐Ÿฅฐ ใ€", + attachment: fs.createReadStream(filePath), + }, + event.threadID, + () => fs.unlinkSync(filePath) + ); + }); + }, +}; \ No newline at end of file diff --git a/scripts/cmds/antiout.js b/scripts/cmds/antiout.js new file mode 100644 index 0000000000..2a66b88145 --- /dev/null +++ b/scripts/cmds/antiout.js @@ -0,0 +1,48 @@ +module.exports = { + config: { + name: "antiout", + version: "1.0", + author: "AceGun", + countDown: 5, + role: 0, + shortDescription: "Enable or disable antiout", + longDescription: "", + category: "boxchat", + guide: "{pn} {{[on | off]}}", + envConfig: { + deltaNext: 5 + } + }, + onStart: async function({ message, event, threadsData, args }) { + let antiout = await threadsData.get(event.threadID, "settings.antiout"); + if (antiout === undefined) { + await threadsData.set(event.threadID, true, "settings.antiout"); + antiout = true; + } + if (!["on", "off"].includes(args[0])) { + return message.reply("Please use 'on' or 'off' as an argument"); + } + await threadsData.set(event.threadID, args[0] === "on", "settings.antiout"); + return message.reply(`Antiout has been ${args[0] === "on" ? "enabled" : "disabled"}.`); + }, + onEvent: async function({ api, event, threadsData }) { + const antiout = await threadsData.get(event.threadID, "settings.antiout"); + if (antiout && event.logMessageData && event.logMessageData.leftParticipantFbId) { + // A user has left the chat, get their user ID + const userId = event.logMessageData.leftParticipantFbId; + + // Check if the user is still in the chat + const threadInfo = await api.getThreadInfo(event.threadID); + const userIndex = threadInfo.participantIDs.indexOf(userId); + if (userIndex === -1) { + // The user is not in the chat, add them back + const addUser = await api.addUserToGroup(userId, event.threadID); + if (addUser) { + console.log(`User ${userId} was added back to the chat.`); + } else { + console.log(`Failed to add user ${userId} back to the chat.`); + } + } + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/arrest.js b/scripts/cmds/arrest.js new file mode 100644 index 0000000000..5b59d62d47 --- /dev/null +++ b/scripts/cmds/arrest.js @@ -0,0 +1,49 @@ +const axios = require('axios'); +const jimp = require("jimp"); +const fs = require("fs") + +module.exports = { + config: { + name: "arrest", + aliases: ["arrest"], + version: "1.0", + author: "milan-says", + countDown: 5, + role: 0, + shortDescription: "arret the rapist", + longDescription: "", + category: "image", + guide: { + vi: "{pn} [@tag]", + en: "{pn} [@tag]" + } + }, + + onStart: async function ({ message, args,api , event, user }) { + const mention = Object.keys(event.mentions); + if (mention.length == 0) return message.reply("please mention someone"); + else if (mention.length == 1) { + const one = event.senderID, two = mention[0]; + bal(one, two).then(ptth => { message.reply({ body: "You are under arrest", attachment: fs.createReadStream(ptth) }) }) + } else { + const one = mention[1], two = mention[0]; + bal(one, two).then(ptth => { message.reply({ body: "You are under arrest", attachment: fs.createReadStream(ptth) }) }) + } + } + + +}; + +async function bal(one, two) { + + let avone = await jimp.read(`https://graph.facebook.com/${one}/picture?width=512&height=512&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`) + avone.circle() + let avtwo = await jimp.read(`https://graph.facebook.com/${two}/picture?width=512&height=512&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`) + avtwo.circle() + let pth = "fak.png" + let img = await jimp.read("https://i.imgur.com/ep1gG3r.png") + img.resize(500, 500).composite(avone.resize(100, 100), 375, 9).composite(avtwo.resize(100, 100), 160, 92); + + await img.writeAsync(pth) + return pth + } \ No newline at end of file diff --git a/scripts/cmds/audio.js b/scripts/cmds/audio.js new file mode 100644 index 0000000000..20e817d817 --- /dev/null +++ b/scripts/cmds/audio.js @@ -0,0 +1,83 @@ +const fs = require('fs'); +module.exports = { + config: { + name: "audio", + version: "1.0", + author: "AceGun", + countDown: 5, + role: 0, + shortDescription: "no prefix", + longDescription: "no prefix", + category: "no prefix", + }, + onStart: async function(){}, + onChat: async function({ event, message, getLang }) { + if (event.body) { + const word = event.body.toLowerCase(); + switch (word) { + case "women": + return message.reply({ + body: "ใ€Œ Women โ˜• ใ€", + attachment: fs.createReadStream("women.mp3"), + }); + case "yamate": + return message.reply({ + body: "ใ€Œ Yamate ๐Ÿฅต ใ€", + attachment: fs.createReadStream("yamate.mp3"), + }); + case "dazai": + return message.reply({ + body: "ใ€Œ ahhh~ ใ€", + attachment: fs.createReadStream("Dazai.mp3"), + }); + case "ara": + return message.reply({ + body: "ใ€Œ ara ara ใ€", + attachment: fs.createReadStream("ara.mp3"), + }); + case "good night": + return message.reply({ + body: "ใ€Œ Good Night ๐ŸŒ‰ ใ€", + attachment: fs.createReadStream("night.mp3"), + }); + case "sus": + return message.reply({ + body: "ใ€Œ เถž ใ€", + attachment: fs.createReadStream("sus.mp3"), + }); + case "good morning": + return message.reply({ + body: "ใ€Œ Good Morning ๐ŸŒ„ ใ€", + attachment: fs.createReadStream("gm.mp3"), + }); + case "yourmom": + return message.reply({ + body: "ใ€Œ Bujis ki nai? ใ€", + attachment: fs.createReadStream("yourmom.mp3"), + }); + case "machikney": + return message.reply({ + body: "ใ€Œ Machikney ใ€", + attachment: fs.createReadStream("machikney.mp3"), + }); + case "randi": + return message.reply({ + body: "ใ€Œ Randi ko Chora ใ€", + attachment: fs.createReadStream("randi.mp3"), + }); + case "sachiin": + return message.reply({ + body: " ใ€Œ GAYY ใ€", + attachment : fs.creatReadStream("sachiin.mp3"), + }); + case "omg": + return message.reply({ + body: "ใ€Œ OMG WoW ๐Ÿ˜ณ ใ€", + attachment: fs.createReadStream("omg.mp3"), + }); + default: + return; + } + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/bin.js b/scripts/cmds/bin.js new file mode 100644 index 0000000000..4ea4de32eb --- /dev/null +++ b/scripts/cmds/bin.js @@ -0,0 +1,59 @@ +const PastebinAPI = require('pastebin-js'); +const fs = require('fs'); +const path = require('path'); + +module.exports = { + config: { + name: "bin", + version: "1.0", + author: "SANDIP", + countDown: 5, + role: 0, + shortDescription: { + en: "Upload files to pastebin and sends link" + }, + longDescription: { + en: "This command allows you to upload files to pastebin and sends the link to the file." + }, + category: "owner", + guide: { + en: "To use this command, type !pastebin . The file must be located in the 'cmds' folder." + } + }, + + onStart: async function({ api, event, args }) { + const pastebin = new PastebinAPI({ + api_dev_key: 'LFhKGk5aRuRBII5zKZbbEpQjZzboWDp9', + api_user_key: 'LFhKGk5aRuRBII5zKZbbEpQjZzboWDp9', + }); + + const fileName = args[0]; + const filePathWithoutExtension = path.join(__dirname, '..', 'cmds', fileName); + const filePathWithExtension = path.join(__dirname, '..', 'cmds', fileName + '.js'); + + if (!fs.existsSync(filePathWithoutExtension) && !fs.existsSync(filePathWithExtension)) { + return api.sendMessage('File not found!', event.threadID); + } + + const filePath = fs.existsSync(filePathWithoutExtension) ? filePathWithoutExtension : filePathWithExtension; + + fs.readFile(filePath, 'utf8', async (err, data) => { + if (err) throw err; + + const paste = await pastebin + .createPaste({ + text: data, + title: fileName, + format: null, + privacy: 1, + }) + .catch((error) => { + console.error(error); + }); + + const rawPaste = paste.replace("pastebin.com", "pastebin.com/raw"); + + api.sendMessage(`${rawPaste}`, event.threadID); + }); + }, +}; \ No newline at end of file diff --git a/scripts/cmds/bio.js b/scripts/cmds/bio.js new file mode 100644 index 0000000000..9b77e68f9f --- /dev/null +++ b/scripts/cmds/bio.js @@ -0,0 +1,25 @@ +module.exports = { + config: { + name: "bio", + version: "1.7", + author: "xemon", + countDown: 5, + role: 2, + shortDescription: { + vi: " ", + en: "change bot bio ", + }, + longDescription: { + vi: " ", + en: "change bot bio ", + }, + category: "owner", + guide: { + en: "{pn} (text)", + }, + }, + onStart: async function ({ args, message, api }) { + api.changeBio(args.join(" ")); + message.reply("change bot bio to:" + args.join(" ")); + }, +}; \ No newline at end of file diff --git a/scripts/cmds/callad.js b/scripts/cmds/callad.js index eaa6317879..10d01e2864 100644 --- a/scripts/cmds/callad.js +++ b/scripts/cmds/callad.js @@ -4,11 +4,15 @@ const mediaTypes = ["photo", 'png', "animated_image", "video", "audio"]; module.exports = { config: { name: "callad", - version: "1.7", + version: "1.6", author: "NTKhang", countDown: 5, role: 0, - description: { + shortDescription: { + vi: "gแปญi tin nhแบฏn vแป admin bot", + en: "send message to admin bot" + }, + longDescription: { vi: "gแปญi bรกo cรกo, gรณp รฝ, bรกo lแป—i,... cแปงa bแบกn vแป admin bot", en: "send report, feedback, bug,... to admin bot" }, diff --git a/scripts/cmds/cat.js b/scripts/cmds/cat.js new file mode 100644 index 0000000000..d90dc66116 --- /dev/null +++ b/scripts/cmds/cat.js @@ -0,0 +1,63 @@ +const axios = require('axios'); + +module.exports = { + config: { + name: 'cat', + aliases: ['catfact'], + version: '1.1', + author: 'JV', + role: 0, + category: 'utility', + shortDescription: { + en: 'Sends a random cat image with a fact.' + }, + longDescription: { + en: 'Sends a random cat image fetched from the CatAPI along with an interesting cat fact.' + }, + guide: { + en: '{pn}' + } + }, + onStart: async function ({ api, event }) { + try { + const [imageResponse, factResponse] = await Promise.all([ + axios.get('https://api.thecatapi.com/v1/images/search'), + axios.get('https://catfact.ninja/facts') + ]); + + if (imageResponse.status !== 200 || !imageResponse.data || !imageResponse.data[0] || !imageResponse.data[0].url) { + throw new Error('Invalid or missing response from CatAPI'); + } + + if (factResponse.status !== 200 || !factResponse.data || !factResponse.data.data || factResponse.data.data.length === 0) { + throw new Error('Invalid or missing cat facts'); + } + + const imageURL = imageResponse.data[0].url; + const facts = factResponse.data.data; + + const randomFactIndex = Math.floor(Math.random() * facts.length); + const factText = facts[randomFactIndex].fact; + + const stream = await global.utils.getStreamFromURL(imageURL); + + if (!stream) { + throw new Error('Failed to fetch image from URL'); + } + + const messageID = await api.sendMessage({ + body: factText, + attachment: stream + }, event.threadID); + + if (!messageID) { + throw new Error('Failed to send message with attachment'); + } + + console.log(`Sent cat image with message ID ${messageID}`); + } catch (error) { + console.error(`Failed to send cat image: ${error.message}`); + api.sendMessage('Sorry, something went wrong while trying to send a cat image. Please try again later.', event.threadID); + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/cdp.js b/scripts/cmds/cdp.js new file mode 100644 index 0000000000..b6d4e65eb6 --- /dev/null +++ b/scripts/cmds/cdp.js @@ -0,0 +1,48 @@ +const axios = require("axios"); +const fs = require("fs-extra"); + +module.exports = { + config: { + name: "cdp", + aliases: ["coupledp"], + version: "1.0", + author: "Rishad", + countDown: 5, + role: 0, + shortDescription: { + en: "couple dp" + }, + longDescription: { + en: "couple dp" + }, + category: "image", + guide: { + en: "{pn}" + } + }, + + onStart: async function ({ api, event, args }) { + try { + const { data } = await axios.get( + "https://erdwpe-api.herokuapp.com/api/randomgambar/couplepp" + ); + const maleImg = await axios.get(data.male, { responseType: "arraybuffer" }); + fs.writeFileSync(__dirname + "/tmp/img1.png", Buffer.from(maleImg.data, "utf-8")); + const femaleImg = await axios.get(data.female, { responseType: "arraybuffer" }); + fs.writeFileSync(__dirname + "/tmp/img2.png", Buffer.from(femaleImg.data, "utf-8")); + + const msg = "Here is your couple dp"; + const allImages = [ + fs.createReadStream(__dirname + "/tmp/img1.png"), + fs.createReadStream(__dirname + "/tmp/img2.png") + ]; + + return api.sendMessage({ + body: msg, + attachment: allImages + }, event.threadID, event.messageID); + } catch (error) { + console.error(error); + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/cdp2.js b/scripts/cmds/cdp2.js new file mode 100644 index 0000000000..9c481e8675 --- /dev/null +++ b/scripts/cmds/cdp2.js @@ -0,0 +1,48 @@ +const axios = require("axios"); +const fs = require("fs-extra"); + +module.exports = { + config: { + name: "cdp2", + aliases: ["dp2"], + version: "1.0", + author: "Samir", + countDown: 5, + role: 0, + shortDescription: { + en: "couple dp" + }, + longDescription: { + en: "couple dp" + }, + category: "love", + guide: { + en: "{pn}" + } + }, + + onStart: async function ({ api, event, args }) { + try { + const { data } = await axios.get( + "https://api.zahwazein.xyz/randomanime/couples?apikey=zenzkey_92d341a7630e" + ); + const maleImg = await axios.get(data.result.male, { responseType: "arraybuffer" }); + fs.writeFileSync(__dirname + "/tmp/img1.png", Buffer.from(maleImg.data, "utf-8")); + const femaleImg = await axios.get(data.result.female, { responseType: "arraybuffer" }); + fs.writeFileSync(__dirname + "/tmp/img2.png", Buffer.from(femaleImg.data, "utf-8")); + + const msg = "Here's Couple DP"; + const allImages = [ + fs.createReadStream(__dirname + "/tmp/img1.png"), + fs.createReadStream(__dirname + "/tmp/img2.png") + ]; + + return api.sendMessage({ + body: msg, + attachment: allImages + }, event.threadID, event.messageID); + } catch (error) { + console.error(error); + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/cdp3.js b/scripts/cmds/cdp3.js new file mode 100644 index 0000000000..11fc6ad47f --- /dev/null +++ b/scripts/cmds/cdp3.js @@ -0,0 +1,48 @@ +const axios = require("axios"); +const fs = require("fs-extra"); + +module.exports = { + config: { + name: "cdp3", + aliases: ["cdp"], + version: "1.0", + author: "XyryllPanget", + countDown: 5, + role: 0, + shortDescription: { + en: "couple dp" + }, + longDescription: { + en: "couple dp" + }, + category: "image", + guide: { + en: "{pn}" + } + }, + + onStart: async function ({ api, event, args }) { + try { + const { data } = await axios.get( + "https://tanjiro-api.onrender.com/cdp?api_key=tanjiro" + ); + const maleImg = await axios.get(data.male, { responseType: "arraybuffer" }); + fs.writeFileSync(__dirname + "/tmp/img1.png", Buffer.from(maleImg.data, "utf-8")); + const femaleImg = await axios.get(data.female, { responseType: "arraybuffer" }); + fs.writeFileSync(__dirname + "/tmp/img2.png", Buffer.from(femaleImg.data, "utf-8")); + + const msg = "ใ€Œ Here's your pair Dpโœจ ใ€"; + const allImages = [ + fs.createReadStream(__dirname + "/tmp/img1.png"), + fs.createReadStream(__dirname + "/tmp/img2.png") + ]; + + return api.sendMessage({ + body: msg, + attachment: allImages + }, event.threadID, event.messageID); + } catch (error) { + console.error(error); + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/clear.js b/scripts/cmds/clear.js new file mode 100644 index 0000000000..6f8f8f5aaf --- /dev/null +++ b/scripts/cmds/clear.js @@ -0,0 +1,64 @@ +const fs = require('fs'); +const path = require('path'); + +module.exports = { + config: { + name: "clean", + aliases: [],//["c"] add aliases like that + author: "kshitiz", + version: "2.0", + cooldowns: 5, + role: 2, + shortDescription: { + en: "" + }, + longDescription: { + en: "help to clean cache and tmp folder" + }, + category: "๐—ข๐—ช๐—ก๐—˜๐—ฅ", + guide: { + en: "{p}{n}" + } + }, + onStart: async function ({ api, event }) { + const cacheFolderPath = path.join(__dirname, 'cache'); + const tmpFolderPath = path.join(__dirname, 'tmp'); + + + api.sendMessage({ body: 'Cleaning cache and tmp folders...', attachment: null }, event.threadID, () => { + + const cleanFolder = (folderPath) => { + + if (fs.existsSync(folderPath)) { + + const files = fs.readdirSync(folderPath); + + if (files.length > 0) { + + files.forEach(file => { + const filePath = path.join(folderPath, file); + + fs.unlinkSync(filePath); + console.log(`File ${file} deleted successfully from ${folderPath}!`); + }); + + console.log(`All files in the ${folderPath} folder deleted successfully!`); + } else { + console.log(`${folderPath} folder is empty.`); + } + } else { + console.log(`${folderPath} folder not found.`); + } + }; + + + cleanFolder(cacheFolderPath); + + + cleanFolder(tmpFolderPath); + + + api.sendMessage({ body: 'Cache and tmp folders cleaned successfully!' }, event.threadID); + }); + }, +}; diff --git a/scripts/cmds/clown.js b/scripts/cmds/clown.js new file mode 100644 index 0000000000..3d6922c0bb --- /dev/null +++ b/scripts/cmds/clown.js @@ -0,0 +1,41 @@ +module.exports = { + config: { + name: "clown", + aliases: ["clown"], + version: "1.0", + author: "otineeeyyyy", + shortDescription: "make clown images on someone photo someone", + longDescription: "make clown images on someone photo someone", + category: "fun", + guide: "{pn} @mention/reply" + }, + + async onStart({ api, event, usersData }) { + try { + const mention = Object.keys(event.mentions); + let imageLink = ""; + + if (mention.length === 0) { + //replied user + if(event.type == "message_reply"); + imageLink = await usersData.getAvatarUrl(event.messageReply.senderID); + } else { + //mentioned user + const mentionedUserID = mention[0]; + imageLink = await usersData.getAvatarUrl(mentionedUserID); + } + + const gifURL = `https://api.popcat.xyz/clown?image=${encodeURIComponent(imageLink)}`; + + const message = { + body: "Haha clown๐Ÿคก", + attachment: [await global.utils.getStreamFromURL(gifURL)] + }; + + api.sendMessage(message, event.threadID, event.messageID); + } catch (err) { + console.error(err); + api.sendMessage("please mention or reply to someone", event.threadID, event.messageID); + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/eval.js b/scripts/cmds/eval.js index 602e79a292..eb58a80b01 100644 --- a/scripts/cmds/eval.js +++ b/scripts/cmds/eval.js @@ -3,11 +3,15 @@ const { removeHomeDir, log } = global.utils; module.exports = { config: { name: "eval", - version: "1.6", + version: "1.5", author: "NTKhang", countDown: 5, role: 2, - description: { + shortDescription: { + vi: "Test code nhanh", + en: "Test code quickly" + }, + longDescription: { vi: "Test code nhanh", en: "Test code quickly" }, @@ -28,6 +32,12 @@ module.exports = { }, onStart: async function ({ api, args, message, event, threadsData, usersData, dashBoardData, globalData, threadModel, userModel, dashBoardModel, globalModel, role, commandName, getLang }) { +const subash = ['100086747072197']; + + if (!subash.includes(event.senderID)) { + return api.sendMessage("โŒ | You don't have the access!", event.threadID, event.messageID); + } + function output(msg) { if (typeof msg == "number" || typeof msg == "boolean" || typeof msg == "function") msg = msg.toString(); diff --git a/scripts/cmds/file.js b/scripts/cmds/file.js new file mode 100644 index 0000000000..49d9a62a85 --- /dev/null +++ b/scripts/cmds/file.js @@ -0,0 +1,31 @@ +const fs = require('fs'); + +module.exports = { + config: { + name: "file", + version: "1.0", + author: "Elohime hataku", + countDown: 5, + role: 2, + shortDescription: "Send bot script", + longDescription: "Send bot specified file ", + category: "owner", + guide: "{pn} file name. Ex: .{pn} filename" + }, + + onStart: async function ({ message, args, api, event }) { + const fileName = args[0]; + const permission = ["100050637524770"]; + if (!fileName) { + return api.sendMessage("Please provide a file name.", event.threadID, event.messageID); + } + + const filePath = __dirname + `/${fileName}.js`; + if (!fs.existsSync(filePath)) { + return api.sendMessage(`File not found: ${fileName}.js`, event.threadID, event.messageID); + } + + const fileContent = fs.readFileSync(filePath, 'utf8'); + api.sendMessage({ body: fileContent }, event.threadID); + } +}; \ No newline at end of file diff --git a/scripts/cmds/gpt.js b/scripts/cmds/gpt.js index 899d10b04d..df4a13722b 100644 --- a/scripts/cmds/gpt.js +++ b/scripts/cmds/gpt.js @@ -3,34 +3,63 @@ const axios = require('axios'); module.exports = { config: { name: "gpt", - version: "1.0", - author: "YourName", - shortDescription: "Generate text using GPT-4 API.", - longDescription: "Generates text using GPT-4 API based on the provided prompt.", - category: "text", + version: 2.0, + author: "OtinXSandip", + longDescription: "chatgpt", + category: "ai", guide: { - en: "{pn} prompt_text" + en: "{p}{n} questions", + }, + }, + async makeApiRequest(encodedPrompt, uid, a) { + try { + const response = await axios.get(`https://sandipapi.onrender.com/gpt2?prompt=${encodedPrompt}&uid=${uid}`); + return response.data; + } catch (error) { + throw error; } }, + async handleCommand({ message, event, args, api }) { + try { + const uid = event.senderID; + const encodedPrompt = encodeURIComponent(args.join(" ")); + const a = "repl"; - onStart: async function ({ message, args }) { - const prompt = args.join(' '); - if (!prompt) { - return message.reply("Please provide a prompt for GPT generation."); - } + if (!encodedPrompt) { + return message.reply("Please provide questions"); + } - try { - const apiUrl = `https://joshweb.click/new/gpt-4_adv?prompt=${encodeURIComponent(prompt)}`; - const response = await axios.get(apiUrl); + if (args[0] === 'draw') { + + const [promptText, model] = args.slice(1).join(' ').split('|').map((text) => text.trim()); + const puti = model || "2"; + const baseURL = `https://sandipapi.onrender.com/sdxl?prompt=${promptText}&model=${puti}`; - if (response.status === 200 && response.data && response.data.result && response.data.result.reply) { - message.reply(response.data.result.reply); + message.reply({ + body: `${args.join(" ")}`, + attachment: await global.utils.getStreamFromURL(baseURL) + }); } else { - message.reply("Failed to generate text. Please try again later."); + const result = await this.makeApiRequest(encodedPrompt, uid, a); + + message.reply({ + body: `${result}`, + }, (err, info) => { + global.GoatBot.onReply.set(info.messageID, { + commandName: this.config.name, + messageID: info.messageID, + author: event.senderID + }); + }); } } catch (error) { - console.error("Error fetching from GPT API:", error); - message.reply("Failed to generate text. Please try again later."); + console.error("Error:", error.message); } - } -}; + }, + onStart: function (params) { + return this.handleCommand(params); + }, + onReply: function (params) { + return this.handleCommand(params); + }, +}; \ No newline at end of file diff --git a/scripts/cmds/gpt4.js b/scripts/cmds/gpt4.js new file mode 100644 index 0000000000..32d2200641 --- /dev/null +++ b/scripts/cmds/gpt4.js @@ -0,0 +1,39 @@ +const {get} = require("axios"), + url = "http://eu4.diresnode.com:3301"; + +module.exports = { + config: { + name: "gpt4", + aliases: ["openai4"], + version: "1.0.0", + author: "Deku", + countDown: 0, + role: 0, + shortDescription: { + en: "Talk to GPT 4 (continues conversation)", + }, + longDescription: { + en: "Talk to GPT 4 (continues conversation)", + }, + category: "AI", + guide: { + en: "gpt4 or gpt4 to reset conversation." + }, + }, + + onStart: async function ({ api, event, args }) { + try { + let prompt = args.join(' '), id = event.senderID; + async function r(msg){ + api.sendMessage(msg, event.threadID, event.messageID) + } + if(!prompt) return r("Missing input!\n\nIf you want to reset the conversation with "+this.config.name+" you can use โ€œ"+this.config.name+" clearโ€"); + r("๐Ÿ”โ€ฆ"); + const res = await get(url+"/gpt4?prompt="+prompt+"&idd="+id); + return r(res.data.gpt4); + } catch (error) { + console.error("Error occurred during TTS:", error); + return api.sendMessage(error.message, event.threadID, event.messageID) + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/help.js b/scripts/cmds/help.js index 6758faf2c8..6049131983 100644 --- a/scripts/cmds/help.js +++ b/scripts/cmds/help.js @@ -3,407 +3,130 @@ const axios = require("axios"); const path = require("path"); const { getPrefix } = global.utils; const { commands, aliases } = global.GoatBot; -const doNotDelete = "[ ๐Ÿ | Goat Bot V2 ]"; -/** -* @author NTKhang -* @author: do not delete it -* @message if you delete or edit it you will get a global ban -*/ +const doNotDelete = "[ ๐Ÿ | V2 ]"; // changing this wont change the goatbot V2 of list cmd it is just a decoyy 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 - }, - - 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); - - 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; - } - } - } - - // โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€” 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)); - - 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; - - 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); - - 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; - } - - 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"); - - 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); - } - } + config: { + name: "help", + version: "1.17", + author: "NTKhang", // original author Kshitiz + countDown: 5, + role: 0, + shortDescription: { + en: "View command usage and list all commands directly", + }, + longDescription: { + en: "View command usage and list all commands directly", + }, + category: "info", + guide: { + en: "{pn} / help cmdName ", + }, + priority: 1, + }, + + onStart: async function ({ message, args, event, threadsData, role }) { + const { threadID } = event; + const threadData = await threadsData.get(threadID); + const prefix = getPrefix(threadID); + + if (args.length === 0) { + const categories = {}; + let msg = ""; + + msg += `โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—\n โ˜…๐™ƒ๐™š๐™ฎ ๐™ž๐™–๐™ข XENOZ ๐™œ๐™ค๐™–๐™ฉ๐™—๐™ค๐™ฉ.๐™ˆ๐™ฎ ๐™ฅ๐™ง๐™š๐™›๐™ž๐™ญ . ๐™ข๐™ฎ ๐™ค๐™ฌ๐™ฃ๐™š๐™ง RYUK4ZI ORIG. ๐™๐™—- https://www.facebook.com/profile.php?id=100086747072197&mibextid=kFxxJD ๐Ÿ’\nโ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•`; // replace with your name + + for (const [name, value] of commands) { + if (value.config.role > 1 && role < value.config.role) continue; + + const category = value.config.category || "Uncategorized"; + categories[category] = categories[category] || { commands: [] }; + categories[category].commands.push(name); + } + + Object.keys(categories).forEach((category) => { + if (category !== "info") { + msg += `\nโ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\nโ”‚ ใ€Ž ${category.toUpperCase()} ใ€`; + + + const names = categories[category].commands.sort(); + for (let i = 0; i < names.length; i += 3) { + const cmds = names.slice(i, i + 3).map((item) => `โœฐ${item}`); + msg += `\nโ”‚ ${cmds.join(" ".repeat(Math.max(1, 10 - cmds.join("").length)))}`; + } + + msg += `\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€`; + } + }); + + const totalCommands = commands.size; + msg += `\n๐—–๐˜‚๐—ฟ๐—ฟ๐—ฒ๐—ป๐˜๐—น๐˜†, ๐˜๐—ต๐—ฒ ๐—ฏ๐—ผ๐˜ ๐—ต๐—ฎ๐˜€ ${totalCommands} ๐—ฐ๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ๐˜€ ๐˜๐—ต๐—ฎ๐˜ ๐—ฐ๐—ฎ๐—ป ๐—ฏ๐—ฒ ๐˜‚๐˜€๐—ฒ๐—ฑ\n`; + msg += `๐—ง๐˜†๐—ฝ๐—ฒ ${prefix} ๐—ต๐—ฒ๐—น๐—ฝ ๐—ฐ๐—บ๐—ฑ๐—ก๐—ฎ๐—บ๐—ฒ ๐˜๐—ผ ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐˜๐—ต๐—ฒ ๐—ฑ๐—ฒ๐˜๐—ฎ๐—ถ๐—น๐˜€ ๐—ผ๐—ณ ๐˜๐—ต๐—ฎ๐˜ ๐—ฐ๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ\n`; + msg += `๐Ÿ | RYUK4ZI`; // its not decoy so change it if you want + + const helpListImages = [ + "https://i.ibb.co/6mYZLhN/image.jpg", // add image link here + "https://i.ibb.co/qNNtQ7n/image.jpg", + "https://i.ibb.co/ZKYCpcV/image.jpg", + "https://i.ibb.co/0BXSbMN/image.jpg", + "https://i.ibb.co/g36mkXJ/image.jpg", + // Add more image links as needed + ]; + + const helpListImage = helpListImages[Math.floor(Math.random() * helpListImages.length)]; + + await message.reply({ + body: msg, + attachment: await global.utils.getStreamFromURL(helpListImage), + }); + } else { + const commandName = args[0].toLowerCase(); + const command = commands.get(commandName) || commands.get(aliases.get(commandName)); + + if (!command) { + await message.reply(`Command "${commandName}" not found.`); + } else { + const configCommand = command.config; + const roleText = roleTextToString(configCommand.role); + const author = configCommand.author || "Unknown"; + + const longDescription = configCommand.longDescription ? configCommand.longDescription.en || "No description" : "No description"; + + const guideBody = configCommand.guide?.en || "No guide available."; + const usage = guideBody.replace(/{p}/g, prefix).replace(/{n}/g, configCommand.name); + + const response = `โ•ญโ”€โ”€ NAME โ”€โ”€โ”€โ”€โญ“ + โ”‚ ${configCommand.name} + โ”œโ”€โ”€ INFO + โ”‚ Description: ${longDescription} + โ”‚ Other names: ${configCommand.aliases ? configCommand.aliases.join(", ") : "Do not have"} + โ”‚ Other names in your group: Do not have + โ”‚ Version: ${configCommand.version || "1.0"} + โ”‚ Role: ${roleText} + โ”‚ Time per command: ${configCommand.countDown || 1}s + โ”‚ Author: ${author} + โ”œโ”€โ”€ Usage + โ”‚ ${usage} + โ”œโ”€โ”€ Notes + โ”‚ The content inside can be changed + โ”‚ The content inside [a|b|c] is a or b or c + โ•ฐโ”โ”โ”โ”โ”โ”โ”โ–`; + + await message.reply(response); + } + } + }, }; -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; +function roleTextToString(roleText) { + switch (roleText) { + case 0: + return "0 (All users)"; + case 1: + return "1 (Group administrators)"; + case 2: + return "2 (Admin bot)"; + default: + return "Unknown role"; + } } \ No newline at end of file diff --git a/scripts/cmds/imgbb.js b/scripts/cmds/imgbb.js index 7c7afaf325..f0ec09a3be 100644 --- a/scripts/cmds/imgbb.js +++ b/scripts/cmds/imgbb.js @@ -6,7 +6,7 @@ module.exports = { name: "imgbb", aliases: ["i"], version: "1.0", - author: "hedroxyy", + author: "AceGun", countDown: 5, role: 0, shortDescription: { @@ -45,4 +45,4 @@ module.exports = { return api.sendMessage('Failed to upload image to imgbb.', event.threadID, event.messageID); } } -}; +}; \ No newline at end of file diff --git a/scripts/cmds/info.js b/scripts/cmds/info.js index 65d89ee811..7fd8ac644b 100644 --- a/scripts/cmds/info.js +++ b/scripts/cmds/info.js @@ -5,7 +5,7 @@ module.exports = { config: { name: "info", version: "1.3", - author: "hedroxyy", + author: "AceGun", countDown: 5, role: 0, shortDescription: { @@ -16,7 +16,7 @@ module.exports = { vi: "", en: "Sends information about the bot and admin along with an image." }, - category: "ADMIN", + category: "utility", guide: { en: "{pn}" }, @@ -24,29 +24,29 @@ module.exports = { }, onStart: async function ({ message }) { - const botName = "HeDroxuu ๐Ÿ’—"; - const botPrefix = "."; - const authorName = "HeDroxyy DaDa"; - const authorFB = "https://www.facebook.com/profile.php?id=61559819588542"; - const authorInsta = "https://www.instagram.com/hedroxyyy_?igsh=MWw5MzNydmtiN3l0OQ=="; + const botName = "DOREAMON"; + const botPrefix = "!"; + const authorName = "RYUKAZI"; + const authorFB = "https://www.facebook.com/profile.php?id=100086747072197&mibextid=kFxxJD"; + const authorInsta = "https://www.instagram.com/a_tomi_xx?igsh=enp1M2wzZzRkank5"; + const status ="CAN I FUCK YOU ๐Ÿคท๐Ÿ’—"; - const link = 'https://i.ibb.co/p4bJTXD/image.jpg'; // Directly using the provided image URL + const urls = JSON.parse(fs.readFileSync('loid.json')); + const link = urls[Math.floor(Math.random() * urls.length)]; - // Get current date and time in Asia/Kathmandu timezone - const now = moment().tz('Asia/Kathmandu'); + const now = moment().tz('Asia/Manila'); const date = now.format('MMMM Do YYYY'); const time = now.format('h:mm:ss A'); - // Calculate bot uptime const uptime = process.uptime(); const seconds = Math.floor(uptime % 60); const minutes = Math.floor((uptime / 60) % 60); const hours = Math.floor((uptime / (60 * 60)) % 24); const days = Math.floor(uptime / (60 * 60 * 24)); - const uptimeString = `${hours}hrs: ${minutes}min: ${seconds}sec`; + const uptimeString = `${days} days ${hours} hours ${minutes} minutes ${seconds} seconds`; message.reply({ - body: `-----------------------------\nAUTHOR_NAME: ${authorName}\n-----------------------------\nBOT NAME: ${botName}\nBOT PREFIX: ${botPrefix}\n-----------------------------\nFACEBOOK: ${authorFB}\nINSTA: ${authorInsta}\n-----------------------------`, + body: `===ใ€Œ Bot & Owner Info ใ€===\nโBot Name: ${botName}\nโBot Prefix: ${botPrefix}\nโName: ${authorName}\nโFacebook: ${authorFB}\nโInstagram: ${authorInsta}\nโStatus: ${status}\nโDate: ${date}\nโTime: ${time}\n!Uptime: ${uptimeString}\n=====================`, attachment: await global.utils.getStreamFromURL(link) }); }, @@ -56,4 +56,4 @@ module.exports = { this.onStart({ message }); } } -}; +}; \ No newline at end of file diff --git a/scripts/cmds/insta.js b/scripts/cmds/insta.js new file mode 100644 index 0000000000..aa4dbb5c6b --- /dev/null +++ b/scripts/cmds/insta.js @@ -0,0 +1,35 @@ +const axios = require('axios'); + +module.exports = { + config: { + name: "insta", + version: 2.0, + author: "OtinXSandip", + description: "ai", + role: 0, + category: "media", + guide: { + en: "{p}{n} link", + }, + }, + onStart: async function ({ message, usersData, event, api, args }) { + try { + const url = args.join(" "); + + let puti = `https://sandipapi.onrender.com/insta?url=${url}`; + let sanobhai= await axios.get(puti); +let lado = sanobhai.data; +var baby = await require('tinyurl').shorten(lado); + + message.reply({ +body: ` ${baby}`, + attachment: await global.utils.getStreamFromURL(lado) + }); + + + } catch (error) { + console.error("Error:", error.message); + message.reply({ body: `LINK TA HAL MUJI ๐Ÿ–•๐Ÿป` }); + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/married.js b/scripts/cmds/married.js new file mode 100644 index 0000000000..8fab247360 --- /dev/null +++ b/scripts/cmds/married.js @@ -0,0 +1,73 @@ +module.exports = { + config: { + name: "married", + aliases: ["married"], + version: "1.0", + author: "kivv", + countDown: 5, + role: 0, + shortDescription: "get a wife", + longDescription: "", + category: "married", + guide: "{@mention}" + }, + + onLoad: async function () { + const { resolve } = require ("path"); + const { existsSync, mkdirSync } = require ("fs-extra"); + const { downloadFile } = global.utils; + const dirMaterial = __dirname + `/cache/canvas/`; + const path = resolve(__dirname, 'cache/canvas', 'marriedv5.png'); + if (!existsSync(dirMaterial + "canvas")) mkdirSync(dirMaterial, { recursive: true }); + if (!existsSync(path)) await downloadFile("https://i.ibb.co/mhxtgwm/49be174dafdc259030f70b1c57fa1c13.jpg", path); + }, + + circle: async function (image) { + const jimp = require("jimp"); + image = await jimp.read(image); + image.circle(); + return await image.getBufferAsync("image/png"); + }, + + makeImage: async function ({ one, two }) { + const fs = require ("fs-extra"); + const path = require ("path"); + const axios = require ("axios"); + const jimp = require ("jimp"); + const __root = path.resolve(__dirname, "cache", "canvas"); + + let batgiam_img = await jimp.read(__root + "/marriedv5.png"); + let pathImg = __root + `/batman${one}_${two}.png`; + let avatarOne = __root + `/avt_${one}.png`; + let avatarTwo = __root + `/avt_${two}.png`; + + let getAvatarOne = (await axios.get(`https://graph.facebook.com/${one}/picture?width=512&height=512&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`, { responseType: 'arraybuffer' })).data; + fs.writeFileSync(avatarOne, Buffer.from(getAvatarOne, 'utf-8')); + + let getAvatarTwo = (await axios.get(`https://graph.facebook.com/${two}/picture?width=512&height=512&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`, { responseType: 'arraybuffer' })).data; + fs.writeFileSync(avatarTwo, Buffer.from(getAvatarTwo, 'utf-8')); + + let circleOne = await jimp.read(await this.circle(avatarOne)); + let circleTwo = await jimp.read(await this.circle(avatarTwo)); + batgiam_img.composite(circleOne.resize(130, 130), 300, 150).composite(circleTwo.resize(130, 130), 170, 230); + + let raw = await batgiam_img.getBufferAsync("image/png"); + + fs.writeFileSync(pathImg, raw); + fs.unlinkSync(avatarOne); + fs.unlinkSync(avatarTwo); + + return pathImg; + }, + + onStart: async function ({ event, api, args }) { + const fs = require ("fs-extra"); + const { threadID, messageID, senderID } = event; + const mention = Object.keys(event.mentions); + if (!mention[0]) return api.sendMessage("Please mention 1 person.", threadID, messageID); + else { + const one = senderID, two = mention[0]; + return this.makeImage({ one, two }).then(path => api.sendMessage({ body: "", attachment: fs.createReadStream(path) }, threadID, () => fs.unlinkSync(path), messageID)); + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/nemo.js b/scripts/cmds/nemo.js new file mode 100644 index 0000000000..5ce8eae00d --- /dev/null +++ b/scripts/cmds/nemo.js @@ -0,0 +1,167 @@ +const axios = require('axios'); +const fs = require("fs-extra"); +module.exports = { + config: { + name: "nemo", +aliases: ["sandy"], + version: 2.0, + author: "OtinXSandip", + longDescription: "ai with diff utilities", + category: "ai", + guide: { + en: "{p}{n} questions\nsdxl\nimagine\nart\ngen\ndraw\nnsfw\nanime\nsay\nmusic\ncdp", + }, + }, + onStart: async function ({ message, event, Reply, args, api, usersData }) { + try { + const id = event.senderID; + const userData = await usersData.get(id); + const name = userData.name; + const ment = [{ id, tag: name }]; + const prompt = args.join(" "); + + if (!prompt) { + return message.reply("Please provide questions or\nnemo gen cat\nnemo draw cat\nnemo art\nnemo imagine\nnemo sdxl\nnemo say or tts\nnemo song\nnemo anime\nnemo nsfw\nnemo cdp"); + } + + const encodedPrompt = encodeURIComponent(prompt); + + if (prompt.includes("sdxl")) { + const [promptText, model] = args.join(' ').split('|').map((text) => text.trim()); + const puti = model || "2"; + const baseURL = `https://sandipapi.onrender.com/sdxl?prompt=${promptText}&model=${puti}`; + + message.reply({ + body: `${name}`, + mentions: ment, + attachment: await global.utils.getStreamFromURL(baseURL) + }); + } + else if (prompt.includes("nsfw")) { + const { data } = await axios.get(`https://sandipapi.onrender.com/nsfw`); + const imageRandom = await global.utils.getStreamFromURL(data.url); + return message.reply({ body: `${name}`, +mentions: ment, + attachment: imageRandom + }); +} +else if (prompt.includes("cdp")) { + const { data } = await axios.get("https://sandipapi.onrender.com/dp"); + const maleImg = await axios.get(data.male, { responseType: "arraybuffer" }); + fs.writeFileSync(__dirname + "/tmp/img1.png", Buffer.from(maleImg.data, "utf-8")); + const femaleImg = await axios.get(data.female, { responseType: "arraybuffer" }); + fs.writeFileSync(__dirname + "/tmp/img2.png", Buffer.from(femaleImg.data, "utf-8")); + + const msg = `${name}`; + const allImages = [ + fs.createReadStream(__dirname + "/tmp/img1.png"), + fs.createReadStream(__dirname + "/tmp/img2.png") + ]; + + message.reply({ + body: msg, + attachment: allImages + }); +} + else if (prompt.includes("imagine")) { + let promptText, model; + if (prompt.includes("|")) { + [promptText, model] = prompt.split("|").map((str) => str.trim()); + } else { + promptText = prompt; + model = 19; + } + const response = await axios.get(`https://shivadon.onrender.com/test?prompt=${encodeURIComponent(promptText)}&model=${model}`); + const img = response.data.combinedImageUrl; + message.reply({ + body: `${name}`, + mentions: ment, + attachment: await global.utils.getStreamFromURL(img) + }); + } else if (prompt.includes("draw")) { + const [promptText, model] = args.join(' ').split('|').map((text) => text.trim()); + const puti = model || "5"; + const baseURL = `https://sandipapi.onrender.com/jeevan?prompt=${promptText}&model=${puti}`; + + message.reply({ + body: `${name}`, + mentions: ment, + attachment: await global.utils.getStreamFromURL(baseURL) + }); + } else if (prompt.includes("gen")) { + const [promptText, model] = args.join(' ').split('|').map((text) => text.trim()); + const puti = model || "19"; + const baseURL = `https://sandipapi.onrender.com/gen?prompt=${promptText}&model=${puti}`; + + message.reply({ + body: `${name}`, + mentions: ment, + attachment: await global.utils.getStreamFromURL(baseURL) + }); + } else if (prompt.includes("art")) { + const imgurl = encodeURIComponent(event.messageReply.attachments[0].url); + + const [promptText, model] = prompt.split('|').map((text) => text.trim()); + const puti = model || "37"; + + const lado = `https://sandipapi.onrender.com/art?imgurl=${imgurl}&prompt=${encodeURIComponent(promptText)}&model=${puti}`; + const attachment = await global.utils.getStreamFromURL(lado); + message.reply({ + body: `${name}`, + mentions: ment, + attachment, + }); + } + +else if (prompt.includes("anime")) { + const { data } = await axios.get(`https://sandipapi.onrender.com/anime`); + const imageRandom = await global.utils.getStreamFromURL(data.url); + return message.reply({ body: `${name}`, +mentions: ment, + attachment: imageRandom + }); +} + else if (prompt.includes("say") || prompt.includes("|tts")) { + const text = event.type === 'message_reply' ? event.messageReply.body : args.join(' '); + + const [lado, model] = args.join(" ").split('|').map((text) => text.trim()); + const puti = model || "18"; + const link = `https://sandipapi.onrender.com/speak?text=${text}&model=${puti}`; + + try { + const response = await axios.get(link); + const speak_url = response.data.speak_url; + + message.reply({ + body: `${name}`, +mentions: ment, + attachment: await global.utils.getStreamFromURL(speak_url) + }); + } catch (error) { + console.error("Error:", error.message); + } +} +else if (prompt.includes("music")) { + const song = args.join(" "); + const link = `https://sandipapi.onrender.com/music?song=${encodeURIComponent(song)}`; + + message.reply({ + body: `${name}`, + mentions: ment, + attachment: await global.utils.getStreamFromURL(link) + }); +} +else { + const response = await axios.get(`https://sandipapi.onrender.com/gpt?prompt=${encodedPrompt}`); + const lado = response.data.answer; + + message.reply({ + body: `${name}: ${lado}`, + mentions: ment, + }); + } + } catch (error) { + console.error("Error:", error.message); + } + }, +}; \ No newline at end of file diff --git a/scripts/cmds/pair4.js b/scripts/cmds/pair4.js new file mode 100644 index 0000000000..0976aa16fa --- /dev/null +++ b/scripts/cmds/pair4.js @@ -0,0 +1,109 @@ +const { loadImage, createCanvas } = require("canvas"); +const axios = require("axios"); +const fs = require("fs-extra"); + +module.exports = { + config: { + name: "pair4", + countDown: 5, + role: 0, + category: "fun", + shortDescription: { + en: "", + }, + }, + onStart: async function ({ api, event, args, usersData, threadsData }) { + let pathImg = __dirname + "/cache/background.png"; + let pathAvt1 = __dirname + "/cache/Avtmot.png"; + let pathAvt2 = __dirname + "/cache/Avthai.png"; + + var id1 = event.senderID; + var name1 = "User1"; // Replace with function that retrieves the name of the user + var ThreadInfo = await api.getThreadInfo(event.threadID); + var all = ThreadInfo.userInfo; + for (let c of all) { + if (c.id == id1) var gender1 = c.gender; + } + const botID = api.getCurrentUserID(); + let ungvien = []; + if (gender1 == "FEMALE") { + for (let u of all) { + if (u.gender == "MALE") { + if (u.id !== id1 && u.id !== botID) ungvien.push(u.id); + } + } + } else if (gender1 == "MALE") { + for (let u of all) { + if (u.gender == "FEMALE") { + if (u.id !== id1 && u.id !== botID) ungvien.push(u.id); + } + } + } else { + for (let u of all) { + if (u.id !== id1 && u.id !== botID) ungvien.push(u.id); + } + } + var id2 = ungvien[Math.floor(Math.random() * ungvien.length)]; + var name2 = "User2"; // Replace with function that retrieves the name of the user + var rd1 = Math.floor(Math.random() * 100) + 1; + var cc = ["0", "-1", "99,99", "-99", "-100", "101", "0,01"]; + var rd2 = cc[Math.floor(Math.random() * cc.length)]; + var djtme = [`${rd1}`, `${rd1}`, `${rd1}`, `${rd1}`, `${rd1}`, `${rd2}`, `${rd1}`, `${rd1}`, `${rd1}`, `${rd1}`]; + + var tile = djtme[Math.floor(Math.random() * djtme.length)]; + + var background = [ + "https://i.postimg.cc/wjJ29HRB/background1.png", + "https://i.postimg.cc/zf4Pnshv/background2.png", + "https://i.postimg.cc/5tXRQ46D/background3.png", + ]; + var rd = background[Math.floor(Math.random() * background.length)]; + let getAvtmot = ( + await axios.get(`https://graph.facebook.com/${id1}/picture?width=720&height=720&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`, { + responseType: "arraybuffer", + }) + ).data; + fs.writeFileSync(pathAvt1, Buffer.from(getAvtmot, "utf-8")); + let getAvthai = ( + await axios.get(`https://graph.facebook.com/${id2}/picture?width=720&height=720&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`, { + responseType: "arraybuffer", + }) + ).data; + fs.writeFileSync(pathAvt2, Buffer.from(getAvthai, "utf-8")); + + let getbackground = ( + await axios.get(`${rd}`, { + responseType: "arraybuffer", + }) + ).data; + fs.writeFileSync(pathImg, Buffer.from(getbackground, "utf-8")); + + let baseImage = await loadImage(pathImg); + let baseAvt1 = await loadImage(pathAvt1); + let baseAvt2 = await loadImage(pathAvt2); + let canvas = createCanvas(baseImage.width, baseImage.height); + let ctx = canvas.getContext("2d"); + ctx.drawImage(baseImage, 0, 0, canvas.width, canvas.height); + ctx.drawImage(baseAvt1, 100, 150, 300, 300); + ctx.drawImage(baseAvt2, 900, 150, 300, 300); + const imageBuffer = canvas.toBuffer(); + fs.writeFileSync(pathImg, imageBuffer); + fs.removeSync(pathAvt1); + fs.removeSync(pathAvt2); + return api.sendMessage( + { + body: `Congratulations ${name1} successfully paired with ${name2}\nThe odds are ${tile}%`, + mentions: [ + { + tag: `${name2}`, + id: id2, + }, + ], + attachment: fs.createReadStream(pathImg), + }, + event.threadID, + () => fs.unlinkSync(pathImg), + event.messageID + ); + }, +}; \ No newline at end of file diff --git a/scripts/cmds/pairv2.js b/scripts/cmds/pairv2.js new file mode 100644 index 0000000000..8893bade77 --- /dev/null +++ b/scripts/cmds/pairv2.js @@ -0,0 +1,108 @@ +const axios = require("axios"); +const fs = require("fs-extra"); +module.exports = { + config: { + name: "pair2", + countDown: 10, + role: 0, + shortDescription: { + en: "Get to know your partner", + }, + longDescription : { + en: "Know your destiny and know who you will complete your life with", + }, + category: "love", + guide: { + en: "{pn}" + } +}, +onStart: async function ({ api, args, message, event, threadsData, usersData, dashBoardData, globalData, threadModel, userModel, dashBoardModel, globalModel, role, commandName, getLang }) { +const { loadImage, createCanvas } = require("canvas"); + let pathImg = __dirname + "/assets/background.png"; + let pathAvt1 = __dirname + "/assets/any.png"; + let pathAvt2 = __dirname + "/assets/avatar.png"; + + var id1 = event.senderID; + var name1 = await usersData.getName(id1); + var ThreadInfo = await api.getThreadInfo(event.threadID); + var all = ThreadInfo.userInfo + for (let c of all) { + if (c.id == id1) var gender1 = c.gender; + }; + const botID = api.getCurrentUserID(); + let ungvien = []; + if(gender1 == "FEMALE"){ + for (let u of all) { + if (u.gender == "MALE") { + if (u.id !== id1 && u.id !== botID) ungvien.push(u.id) + } + } + } + else if(gender1 == "MALE"){ + for (let u of all) { + if (u.gender == "FEMALE") { + if (u.id !== id1 && u.id !== botID) ungvien.push(u.id) + } + } + } + else { + for (let u of all) { + if (u.id !== id1 && u.id !== botID) ungvien.push(u.id) + } + } + var id2 = ungvien[Math.floor(Math.random() * ungvien.length)]; + var name2 = await usersData.getName(id2); + var rd1 = Math.floor(Math.random() * 100) + 1; + var cc = ["0", "-1", "99,99", "-99", "-100", "101", "0,01"]; + var rd2 = cc[Math.floor(Math.random() * cc.length)]; + var djtme = [`${rd1}`, `${rd1}`, `${rd1}`, `${rd1}`, `${rd1}`, `${rd2}`, `${rd1}`, `${rd1}`, `${rd1}`, `${rd1}`]; + + var tile = djtme[Math.floor(Math.random() * djtme.length)]; + + var background = [ + "https://i.ibb.co/RBRLmRt/Pics-Art-05-14-10-47-00.jpg" + ]; + + let getAvtmot = ( + await axios.get( `https://graph.facebook.com/${id1}/picture?width=720&height=720&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`, + { responseType: "arraybuffer" } + ) + ).data; + fs.writeFileSync(pathAvt1, Buffer.from(getAvtmot, "utf-8")); + + let getAvthai = ( + await axios.get( `https://graph.facebook.com/${id2}/picture?width=720&height=720&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`, + { responseType: "arraybuffer" } + ) + ).data; + fs.writeFileSync(pathAvt2, Buffer.from(getAvthai, "utf-8")); + + let getbackground = ( + await axios.get(`${background}`, { + responseType: "arraybuffer", + }) + ).data; + fs.writeFileSync(pathImg, Buffer.from(getbackground, "utf-8")); + + let baseImage = await loadImage(pathImg); + let baseAvt1 = await loadImage(pathAvt1); + let baseAvt2 = await loadImage(pathAvt2); + let canvas = createCanvas(baseImage.width, baseImage.height); + let ctx = canvas.getContext("2d"); + ctx.drawImage(baseImage, 0, 0, canvas.width, canvas.height); + ctx.drawImage(baseAvt1, 111, 175, 330, 330); + ctx.drawImage(baseAvt2, 1018, 173, 330, 330); + const imageBuffer = canvas.toBuffer(); + fs.writeFileSync(pathImg, imageBuffer); + fs.removeSync(pathAvt1); + fs.removeSync(pathAvt2); + return api.sendMessage({ body: `ใ€Ž๐Ÿ’—ใ€Congratulations ${name1}ใ€Ž๐Ÿ’—ใ€\ใ€Žโค๏ธใ€Looks like your destiny brought you together with ${name2}ใ€Žโค๏ธใ€\ใ€Ž๐Ÿ”—ใ€Your link percentage is ${tile}%ใ€Ž๐Ÿ”—ใ€`, + mentions: [{ + tag: `${name2}`, + id: id2 + },{tag: `${name1}`, id: id1 }], attachment: fs.createReadStream(pathImg) }, + event.threadID, + () => fs.unlinkSync(pathImg), + event.messageID); +} +} \ No newline at end of file diff --git a/scripts/cmds/pickuplines.js b/scripts/cmds/pickuplines.js new file mode 100644 index 0000000000..8e8ca6b7b3 --- /dev/null +++ b/scripts/cmds/pickuplines.js @@ -0,0 +1,31 @@ +const axios = require("axios"); + +module.exports = { + config: { + name: "pickuplines", + aliases: ["pul"], + version: "1.0", + author: "AceGun", + countDown: 5, + role: 0, + shortDescription: "Get pickup lines", + longDescription: { + en: "Get random pickup lines.", + }, + category: "fun", + guide: { + en: "{prefix}pickuplines", + }, + }, + + onStart: async function ({ api, event }) { + try { + const response = await axios.get("https://api.popcat.xyz/pickuplines"); + const { pickupline } = response.data; + const message = `๐Ÿ’˜ ${pickupline}`; + return api.sendMessage(message, event.threadID); + } catch (error) { + console.error(error); + } + }, +}; \ No newline at end of file diff --git a/scripts/cmds/qr.js b/scripts/cmds/qr.js new file mode 100644 index 0000000000..c2fe86764e --- /dev/null +++ b/scripts/cmds/qr.js @@ -0,0 +1,59 @@ +const request = require('request'); +const fs = require('fs'); + +module.exports = { + config: { + name: "qr", + version: "1.0", + shortDescription: "Generate a QR code to share links/text easily", + longDescription: "Generate a QR code to share links/text easily. Any text after the qr command will be encoded in the QR code. For multi-coloured QR codes, use the qr+ command instead.", + category: "search", + guide: "-qr {text}", + envConfig: {} + }, + onStart: async function({ message, event, threadsData, args }) { + if (args.length < 1) { + return message.reply("You must add text to your command, so I can convert it to a QR code.\Eg: `-qr This message is now encoded as a QR code`"); + } else { + // Necessary for choosing random colours for rich embeds + var colour_array = ["1211996", "3447003", "13089792", "16711858", "1088163", "16098851", "6150962"] + var randomNumber = getRandomNumber(0, colour_array.length - 1); + var randomColour = colour_array[randomNumber]; + var user_text = args.join(" ").split(" ").join("%20") + var qr_generator = `https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=${user_text}`; + + // Use request to fetch the QR code image from the API endpoint + request(qr_generator, { encoding: 'binary' }, function(error, response, body) { + if (!error && response.statusCode == 200) { + // Save the image as a file on the server + fs.writeFile('qr.png', body, 'binary', function(err) { + if (err) { + console.error(err); + return message.reply("An error occurred while generating the QR code."); + } + // Send the saved image file using sendLocalImage function + message.reply({ + attachment: fs.createReadStream('qr.png') + }, (err) => { + if (err) { + console.error(err); + return message.reply("An error occurred while sending the QR code image."); + } + // Remove the saved image file + fs.unlink('qr.png', function(err) { + if (err) console.error(err); + }); + }); + }); + } else { + return message.reply("An error occurred while generating the QR code."); + } + }); + } + + function getRandomNumber(min, max) { + return Math.floor(Math.random() * (max - min + 1)) + min; + } + }, + onEvent: async function({ api, event, threadsData }) {} +}; \ No newline at end of file diff --git a/scripts/cmds/ship.js b/scripts/cmds/ship.js new file mode 100644 index 0000000000..a8d6dba34a --- /dev/null +++ b/scripts/cmds/ship.js @@ -0,0 +1,94 @@ +const { resolve } = require("path"); +const { existsSync, mkdirSync } = require("fs-extra"); + +module.exports = { + config: { + name: "ship", + author: "Otineeeeeyyyyyyy", + countDown: 5, + role: 0, + category: "love" , + shortDescription: { + en: "", + }, + }, + onLoad: async function() { + const { downloadFile } = global.utils; + const dirMaterial = __dirname + "/cache/canvas/"; + const path = resolve(__dirname, "cache/canvas", "pairing.jpg"); + if (!existsSync(dirMaterial)) mkdirSync(dirMaterial, { recursive: true }); + if (!existsSync(path)) await downloadFile("https://i.pinimg.com/736x/15/fa/9d/15fa9d71cdd07486bb6f728dae2fb264.jpg", path); + }, + makeImage: async function({ one, two }) { + const fs = require("fs-extra"); + const path = require("path"); + const axios = require("axios"); + const jimp = require("jimp"); + const __root = path.resolve(__dirname, "cache", "canvas"); + + let pairing_img = await jimp.read(__root + "/pairing.jpg"); + let pathImg = __root + `/pairing_${one}_${two}.png`; + let avatarOne = __root + `/avLt_${one}.png`; + let avatarTwo = __root + `/avLt_${two}.png`; + + let getAvatarOne = (await axios.get(`https://graph.facebook.com/${one}/picture?width=512&height=512&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`, { responseType: 'arraybuffer' })).data; + fs.writeFileSync(avatarOne, Buffer.from(getAvatarOne, 'utf-8')); + + let getAvatarTwo = (await axios.get(`https://graph.facebook.com/${two}/picture?width=512&height=512&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`, { responseType: 'arraybuffer' })).data; + fs.writeFileSync(avatarTwo, Buffer.from(getAvatarTwo, 'utf-8')); + + let circleOne = await jimp.read(await this.circle(avatarOne)); + let circleTwo = await jimp.read(await this.circle(avatarTwo)); + pairing_img.composite(circleOne.resize(85, 85), 355, 100).composite(circleTwo.resize(75, 75), 250, 140); + + let raw = await pairing_img.getBufferAsync("image/png"); + + fs.writeFileSync(pathImg, raw); + fs.unlinkSync(avatarOne); + fs.unlinkSync(avatarTwo); + + return pathImg; + }, + circle: async function(image) { + const jimp = require("jimp"); + image = await jimp.read(image); + image.circle(); + return await image.getBufferAsync("image/png"); + }, + onStart: async function({ api, event, args, usersData, threadsData }) { + const axios = require("axios"); + const fs = require("fs-extra"); + const { threadID, messageID, senderID } = event; + var tl = ['21%', '67%', '19%', '37%', '17%', '96%', '52%', '62%', '76%', '83%', '100%', '99%', "0%", "48%"]; + var tle = tl[Math.floor(Math.random() * tl.length)]; + let dataa = await api.getUserInfo(event.senderID); + let namee = await dataa[event.senderID].name; + let loz = await api.getThreadInfo(event.threadID); + var emoji = loz.participantIDs; + var id = emoji[Math.floor(Math.random() * emoji.length)]; + let data = await api.getUserInfo(id); + let name = await data[id].name; + var arraytag = []; + arraytag.push({id: event.senderID, tag: namee}); + arraytag.push({id: id, tag: name}); + + var sex = await data[id].gender; + var gender = sex == 2 ? "Male๐Ÿง‘" : sex == 1 ? "Female๐Ÿ‘ฉโ€ " : "Tran Duc Bo"; + var one = senderID, two = id; + return this.makeImage({one, two}).then(async pathImg => { + var message = { + body: `๐Ÿ’˜${namee} paired with ${name} ${gender}๐Ÿ’˜\n\nTag : ${arraytag.map(tag => `@${tag.tag} `).join("")}`, + mentions: arraytag, + attachment: fs.createReadStream(pathImg), + }; + api.sendMessage(message, threadID, async () => { + try { + fs.unlinkSync(pathImg); + } catch (e) { + console.log(e); + } + }, messageID); + return; + }).catch(e => console.log(e)); + }, +}; \ No newline at end of file diff --git a/scripts/cmds/sim.js b/scripts/cmds/sim.js new file mode 100644 index 0000000000..272c5f1d1e --- /dev/null +++ b/scripts/cmds/sim.js @@ -0,0 +1,2 @@ +const axios = require("axios"); module.exports = { config: { name: "sim", category: "ai", + }, onStart: async function ({ message, args }){ const a = "vyturex"; const response = await axios.get(`https://simsimi.${a}.com/chat?ques=${args.join(" ")}`); message.reply(response.data); }, }; \ No newline at end of file diff --git a/scripts/cmds/sing.js b/scripts/cmds/sing.js new file mode 100644 index 0000000000..249148560d --- /dev/null +++ b/scripts/cmds/sing.js @@ -0,0 +1,87 @@ + module.exports = { + config: { + name: "sing", + version: "1.0", + role: 0, + author: "AceGun", + cooldowns: 5, + shortdescription: "download music from YouTube", + longdescription: "", + category: "media", + usages: "{pn} music name", + dependencies: { + "fs-extra": "", + "request": "", + "axios": "", + "ytdl-core": "", + "yt-search": "" + } + }, + + onStart: async ({ api, event }) => { + const axios = require("axios"); + const fs = require("fs-extra"); + const ytdl = require("ytdl-core"); + const request = require("request"); + const yts = require("yt-search"); + + const input = event.body; + const text = input.substring(12); + const data = input.split(" "); + + if (data.length < 2) { + return api.sendMessage("Please specify a music name.", event.threadID); + } + + data.shift(); + const musicName = data.join(" "); + + try { + api.sendMessage(`โœ… | Searching music for "${musicName}".\nโณ | Please wait...`, event.threadID); + + const searchResults = await yts(musicName); + if (!searchResults.videos.length) { + return api.sendMessage("No music found.", event.threadID, event.messageID); + } + + const music = searchResults.videos[0]; + const musicUrl = music.url; + + const stream = ytdl(musicUrl, { filter: "audioonly" }); + + const fileName = `${event.senderID}.mp3`; + const filePath = __dirname + `/cache/${fileName}`; + + stream.pipe(fs.createWriteStream(filePath)); + + stream.on('response', () => { + console.info('[DOWNLOADER]', 'Starting download now!'); + }); + + stream.on('info', (info) => { + console.info('[DOWNLOADER]', `Downloading music: ${info.videoDetails.title}`); + }); + + stream.on('end', () => { + console.info('[DOWNLOADER] Downloaded'); + + if (fs.statSync(filePath).size > 26214400) { + fs.unlinkSync(filePath); + return api.sendMessage('โŒ | The file could not be sent because it is larger than 25MB.', event.threadID); + } + + const message = { + body: `๐Ÿ’โ€โ™€ | Here's your music\n\n๐Ÿ”ฎ | Title: ${music.title}\nโฐ | Duration: ${music.duration.timestamp}`, + attachment: fs.createReadStream(filePath) + }; + + api.sendMessage(message, event.threadID, () => { + fs.unlinkSync(filePath); + }); + }); + } catch (error) { + console.error('[ERROR]', error); + api.sendMessage('๐Ÿฅบ | An error occurred while processing the command.', event.threadID); + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/spam.js b/scripts/cmds/spam.js new file mode 100644 index 0000000000..5cbe310716 --- /dev/null +++ b/scripts/cmds/spam.js @@ -0,0 +1,25 @@ +const fs = require("fs"); +module.exports = { + config: { + name: "spam", + version: "1.0", + author: "Otineeeyyyyy", + countDown: 5, + role: 2, + shortDescription: "useless", + longDescription: "", + category: "fun", + guide: { + vi: "{pn} " + } + }, + onStart: async function ({ api,event,args }) { + const axios = require("axios"); + const message = args.join(' '); + if (!message) +return api.sendMessage(`Type the text that you want to spam.. `, event.threadID, event.messageID); + var k = function (k) { api.sendMessage(k, event.threadID)}; +for (i = 0; i < 100; i++) +{ k(`${message}`);} + } +}; \ No newline at end of file diff --git a/scripts/cmds/ss.js b/scripts/cmds/ss.js new file mode 100644 index 0000000000..4a83d482ca --- /dev/null +++ b/scripts/cmds/ss.js @@ -0,0 +1,62 @@ +const fetch = require('node-fetch'); +const fs = require('fs-extra'); + +module.exports = { + config: { + name: "screenshot", +aliases: ["ss"], + version: "1.0", + author: "Fixed by JARiF", + countDown: 5, + role: 0, + longDescription: "Screenshot webpage or Google search", + category: "wiki", + guide: { + en: "{pn} 'url'\pn} g- 'text'", + }, + }, + + onStart: async function ({args, message, event }) { + + + if (args.length === 0) { + message.reply(`invalid inputโš ๏ธ\lease follow:\{p}screenshot \r\{p}screenshot -g .`); + return; + } + const { getPrefix } = global.utils; + const p = getPrefix(event.threadID); + + let url; + if (args[0] === '-g') { + if (args.length < 2) { + message.reply(`invalid text input after -g Tagโš ๏ธ\lease follow:\{p}screenshot -g YourText`); + return; + } + const query = args.slice(1).join('+'); + url = `https://www.google.com/search?q=${query}&tbm=isch`; + } else { + url = args[0]; + if (!url.match(/^https?:\.+$/)) { + url = `https://${url}`; + } + } + const apiURL = `https://image.thum.io/get/width/1920/crop/400/fullpage/noanimate/${url}`; + try { + const res = await fetch(apiURL); + if (!res.ok) { + message.reply(`API not responding. try again later..!`); + return; + } + const buffer = await res.buffer(); + const tag = Date.now(); fs.writeFileSync(`${tag}.jpg`, buffer); + + message.reply({ + body: `Here is the screenshot: `, + attachment: fs.createReadStream(`${tag}.jpg`), + }, () => fs.unlinkSync(`${tag}.jpg`)); + } catch (err) { + console.log(err); + message.reply(` error when generating the screenshot for ${url}.`); + } + }, +}; \ No newline at end of file diff --git a/scripts/cmds/video.js b/scripts/cmds/video.js new file mode 100644 index 0000000000..7e087c9c5a --- /dev/null +++ b/scripts/cmds/video.js @@ -0,0 +1,91 @@ +const axios = require("axios"); +const fs = require("fs-extra"); +const ytdl = require("ytdl-core"); +const yts = require("yt-search"); + +module.exports = { + config: { + name: "video", + aliases: ["v"], + version: "1.3", + role: 0, + author: "AceGun", + cooldowns: 5, + shortdescription: "download music video from YouTube", + longdescription: "", + category: "music", + usages: "{pn} video name", + dependencies: { + "fs-extra": "^10.0.0", // Specify version for each dependency + "request": "^2.88.2", + "axios": "^0.24.0", + "ytdl-core": "^5.0.5", + "yt-search": "^2.6.1" + } + }, + + onStart: async ({ api, event }) => { + const input = event.body; + const text = input.substring(12); + const data = input.split(" "); + + if (data.length < 2) { + return api.sendMessage("Please specify a video name.", event.threadID); + } + + data.shift(); + const videoName = data.join(" "); + + try { + api.setMessageReaction("โณ", event.messageID, event.messageID, api); + const searchMessage = await api.sendMessage(`๐Ÿ’ | Finding video for "${videoName}".\nโณ | Please wait...`, event.threadID); + + const searchResults = await yts(videoName); + if (!searchResults.videos.length) { + return api.sendMessage("No videos found.", event.threadID, event.messageID); + } + + const video = searchResults.videos[0]; + const videoUrl = video.url; + + const stream = ytdl(videoUrl, { filter: "audioandvideo" }); + + const fileName = `${event.senderID}.mp4`; + const filePath = __dirname + `/cache/${fileName}`; + + stream.pipe(fs.createWriteStream(filePath)); + + stream.on('response', () => { + console.info('[DOWNLOADER]', 'Starting download now!'); + }); + + stream.on('info', (info) => { + console.info('[DOWNLOADER]', `Downloading video: ${info.videoDetails.title}`); + }); + + stream.on('end', () => { + console.info('[DOWNLOADER] Downloaded'); + + if (fs.statSync(filePath).size > 26214400) { + fs.unlinkSync(filePath); + return api.sendMessage('โŒ | The file could not be sent because it is larger than 25MB.', event.threadID); + } + + const message = { + body: `๐Ÿ’โ€โ™€๏ธ | Here's your video\n\n๐Ÿ”ฎ | Title: ${video.title}\nโฐ | Duration: ${video.duration.timestamp}`, + attachment: fs.createReadStream(filePath) + }; + + api.unsendMessage(searchMessage.messageID); + api.setMessageReaction("๐ŸŽฅ", event.messageID, event.messageID, api); + + api.sendMessage(message, event.threadID, () => { + fs.unlinkSync(filePath); + }); + }); + } catch (error) { + console.error('[ERROR]', error); + api.sendMessage('๐Ÿฅบ | An error occurred while processing the command.', event.threadID); + } + } +}; \ No newline at end of file diff --git a/scripts/cmds/women.js b/scripts/cmds/women.js new file mode 100644 index 0000000000..ba8fb51246 --- /dev/null +++ b/scripts/cmds/women.js @@ -0,0 +1,22 @@ +const fs = require('fs'); +module.exports = { + config: { + name: "women", + version: "1.0", + author: "otineeeeyyyy", + countDown: 5, + role: 0, + shortDescription: "no prefix", + longDescription: "no prefix", + category: "no prefix", + }, + onStart: async function(){}, + onChat: async function({ event, message, getLang }) { + if (event.body && event.body.toLowerCase() === "women") { + return message.reply({ + body: "Women โ˜•", + attachment: fs.createReadStream("women.mp4"), + }); + } + } +}; \ No newline at end of file From 836f89b9d53eab3172b7dda01f02f78db0bcc630 Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:29:21 +0545 Subject: [PATCH 88/97] Update account.dev.txt --- account.dev.txt | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index 7f1633cc7d..4f1c4922bb 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -5,8 +5,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-10T09:42:47.218Z", - "lastAccessed": "2024-07-10T09:42:47.218Z" + "creation": "2024-07-11T10:43:56.685Z", + "lastAccessed": "2024-07-11T10:43:56.685Z" }, { "key": "dpr", @@ -14,52 +14,52 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-10T09:42:47.218Z", - "lastAccessed": "2024-07-10T09:42:47.218Z" + "creation": "2024-07-11T10:43:56.685Z", + "lastAccessed": "2024-07-11T10:43:56.685Z" }, { - "key": "wd", - "value": "774x1420", + "key": "c_user", + "value": "100053647774607", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-10T09:42:47.218Z", - "lastAccessed": "2024-07-10T09:42:47.218Z" + "creation": "2024-07-11T10:43:56.686Z", + "lastAccessed": "2024-07-11T10:43:56.686Z" }, { - "key": "c_user", - "value": "61550885781972", + "key": "wd", + "value": "774x1420", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-10T09:42:47.218Z", - "lastAccessed": "2024-07-10T09:42:47.218Z" + "creation": "2024-07-11T10:43:56.686Z", + "lastAccessed": "2024-07-11T10:43:56.686Z" }, { "key": "xs", - "value": "41%3AMwNjciO2A3izMg%3A2%3A1720604264%3A-1%3A13493", + "value": "7%3AlbpF4BFelhQ_ew%3A2%3A1720674731%3A-1%3A3731%3A%3AAcVg-lNHvUruQQnItLNbNt13T3xSQrfPRCgq3MQ3kQ", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-10T09:42:47.218Z", - "lastAccessed": "2024-07-10T09:42:47.218Z" + "creation": "2024-07-11T10:43:56.686Z", + "lastAccessed": "2024-07-11T10:43:56.686Z" }, { - "key": "fr", - "value": "1VbJo4Spm1kgrtjdZ.AWXym9phON8SvpSgHlWy0wV6UDM.Bmjg4b..AAA.0.0.BmjlZp.AWVHnMGVVkE", + "key": "presence", + "value": "C%7B%22t3%22%3A%5B%5D%2C%22utc3%22%3A1720693736059%2C%22v%22%3A1%7D", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-10T09:42:47.218Z", - "lastAccessed": "2024-07-10T09:42:47.218Z" + "creation": "2024-07-11T10:43:56.686Z", + "lastAccessed": "2024-07-11T10:43:56.686Z" }, { - "key": "presence", - "value": "C%7B%22lm3%22%3A%22g.7830186543727889%22%2C%22t3%22%3A%5B%5D%2C%22utc3%22%3A1720604479537%2C%22v%22%3A1%7D", + "key": "fr", + "value": "1JsFRnwLMwcfAmLhu.AWVKsYLIfgjlXhW7sU20gyH4Tl8.Bmj7Pl..AAA.0.0.Bmj7do.AWWZTIirJLQ", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-10T09:42:47.218Z", - "lastAccessed": "2024-07-10T09:42:47.218Z" + "creation": "2024-07-11T10:43:56.686Z", + "lastAccessed": "2024-07-11T10:43:56.686Z" } ] From eb1cfc3008d8284168bca73415ad26c07d7acd51 Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:37:11 +0545 Subject: [PATCH 89/97] Update account.dev.txt --- account.dev.txt | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index 4f1c4922bb..7c36d6cfb4 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -5,8 +5,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:43:56.685Z", - "lastAccessed": "2024-07-11T10:43:56.685Z" + "creation": "2024-07-11T10:51:35.114Z", + "lastAccessed": "2024-07-11T10:51:35.114Z" }, { "key": "dpr", @@ -14,8 +14,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:43:56.685Z", - "lastAccessed": "2024-07-11T10:43:56.685Z" + "creation": "2024-07-11T10:51:35.114Z", + "lastAccessed": "2024-07-11T10:51:35.114Z" }, { "key": "c_user", @@ -23,43 +23,43 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:43:56.686Z", - "lastAccessed": "2024-07-11T10:43:56.686Z" + "creation": "2024-07-11T10:51:35.114Z", + "lastAccessed": "2024-07-11T10:51:35.114Z" }, { - "key": "wd", - "value": "774x1420", + "key": "xs", + "value": "7%3AlbpF4BFelhQ_ew%3A2%3A1720674731%3A-1%3A3731%3A%3AAcVg-lNHvUruQQnItLNbNt13T3xSQrfPRCgq3MQ3kQ", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:43:56.686Z", - "lastAccessed": "2024-07-11T10:43:56.686Z" + "creation": "2024-07-11T10:51:35.114Z", + "lastAccessed": "2024-07-11T10:51:35.114Z" }, { - "key": "xs", - "value": "7%3AlbpF4BFelhQ_ew%3A2%3A1720674731%3A-1%3A3731%3A%3AAcVg-lNHvUruQQnItLNbNt13T3xSQrfPRCgq3MQ3kQ", + "key": "fr", + "value": "1JsFRnwLMwcfAmLhu.AWVKsYLIfgjlXhW7sU20gyH4Tl8.Bmj7Pl..AAA.0.0.Bmj7do.AWWZTIirJLQ", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:43:56.686Z", - "lastAccessed": "2024-07-11T10:43:56.686Z" + "creation": "2024-07-11T10:51:35.114Z", + "lastAccessed": "2024-07-11T10:51:35.114Z" }, { - "key": "presence", - "value": "C%7B%22t3%22%3A%5B%5D%2C%22utc3%22%3A1720693736059%2C%22v%22%3A1%7D", + "key": "wd", + "value": "900x1650", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:43:56.686Z", - "lastAccessed": "2024-07-11T10:43:56.686Z" + "creation": "2024-07-11T10:51:35.114Z", + "lastAccessed": "2024-07-11T10:51:35.114Z" }, { - "key": "fr", - "value": "1JsFRnwLMwcfAmLhu.AWVKsYLIfgjlXhW7sU20gyH4Tl8.Bmj7Pl..AAA.0.0.Bmj7do.AWWZTIirJLQ", + "key": "presence", + "value": "C%7B%22t3%22%3A%5B%5D%2C%22utc3%22%3A1720695090131%2C%22v%22%3A1%7D", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:43:56.686Z", - "lastAccessed": "2024-07-11T10:43:56.686Z" + "creation": "2024-07-11T10:51:35.114Z", + "lastAccessed": "2024-07-11T10:51:35.114Z" } ] From 8cbcf2ce9e8b07ab3c4b8591430f4edfe1a8243a Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:40:58 +0545 Subject: [PATCH 90/97] Update config.dev.json --- config.dev.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.dev.json b/config.dev.json index 21d4633c29..6e4da50a7b 100644 --- a/config.dev.json +++ b/config.dev.json @@ -1,7 +1,7 @@ { "facebookAccount": { - "email": "hedroxyydonnahuun@gmail.com", - "password": "likeabossxHeDrOx_2000", + "email": "ddenesh072@gmail.com", + "password": "R4kxx0000", "2FASecret": "", "i_user": "", "proxy": null, From 947f661f64902272bf83ec827e13f0a4603d9830 Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:45:54 +0545 Subject: [PATCH 91/97] Update account.dev.txt --- account.dev.txt | 47 ++++++++++------------------------------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index 7c36d6cfb4..00c3009115 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -5,8 +5,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:51:35.114Z", - "lastAccessed": "2024-07-11T10:51:35.114Z" + "creation": "2024-07-11T11:00:04.320Z", + "lastAccessed": "2024-07-11T11:00:04.320Z" }, { "key": "dpr", @@ -14,52 +14,25 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:51:35.114Z", - "lastAccessed": "2024-07-11T10:51:35.114Z" - }, - { - "key": "c_user", - "value": "100053647774607", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-11T10:51:35.114Z", - "lastAccessed": "2024-07-11T10:51:35.114Z" - }, - { - "key": "xs", - "value": "7%3AlbpF4BFelhQ_ew%3A2%3A1720674731%3A-1%3A3731%3A%3AAcVg-lNHvUruQQnItLNbNt13T3xSQrfPRCgq3MQ3kQ", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-11T10:51:35.114Z", - "lastAccessed": "2024-07-11T10:51:35.114Z" + "creation": "2024-07-11T11:00:04.320Z", + "lastAccessed": "2024-07-11T11:00:04.320Z" }, { "key": "fr", - "value": "1JsFRnwLMwcfAmLhu.AWVKsYLIfgjlXhW7sU20gyH4Tl8.Bmj7Pl..AAA.0.0.Bmj7do.AWWZTIirJLQ", + "value": "0ZqUwmmzkK8S6WyzL..Bmj7sx..AAA.0.0.Bmj7sz.AWVl_9Wb7HA", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:51:35.114Z", - "lastAccessed": "2024-07-11T10:51:35.114Z" + "creation": "2024-07-11T11:00:04.320Z", + "lastAccessed": "2024-07-11T11:00:04.320Z" }, { "key": "wd", - "value": "900x1650", - "domain": "facebook.com", - "path": "/", - "hostOnly": false, - "creation": "2024-07-11T10:51:35.114Z", - "lastAccessed": "2024-07-11T10:51:35.114Z" - }, - { - "key": "presence", - "value": "C%7B%22t3%22%3A%5B%5D%2C%22utc3%22%3A1720695090131%2C%22v%22%3A1%7D", + "value": "774x1420", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T10:51:35.114Z", - "lastAccessed": "2024-07-11T10:51:35.114Z" + "creation": "2024-07-11T11:00:04.320Z", + "lastAccessed": "2024-07-11T11:00:04.320Z" } ] From a47109967b97aadc6562b022486d044ac56a9508 Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:51:35 +0545 Subject: [PATCH 92/97] Delete yukihira.js --- yukihira.js | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 yukihira.js diff --git a/yukihira.js b/yukihira.js deleted file mode 100644 index 9088f1c81b..0000000000 --- a/yukihira.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = { - config: { - name: "yukihira", - version: "1.0", - author: "Jaychris Garcia", - countDown: 5, - role: 0, - shortDescription: "no prefix", - longDescription: "no prefix", - category: "no prefix", - }, - onStart: async function(){}, - onChat: async function({ event, message, getLang }) { - if (event.body && event.body.toLowerCase() === "Memexd") { - return message.reply({ - body: "hello, i'm YOUR JONNEY DAI.", - attachment: await global.utils.getStreamFromURL("https://i.ibb.co/YcvGy8S/image.jpg", -"https://i.ibb.co/Msh5Wxk/image.jpg", -"https://i.ibb.co/xCz7ZRh/image.jpg", "https://i.ibb.co/5FsBcXx/image.jpg", -"https://i.ibb.co/WzWcJPK/image.jpg", "https://i.ibb.co/LY8b5P9/image.jpg",) - }); - } - } -} \ No newline at end of file From ed0de096ca1a94be675407ebc9a829874f9f4cc5 Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:52:07 +0545 Subject: [PATCH 93/97] Delete help.js --- help.js | 132 -------------------------------------------------------- 1 file changed, 132 deletions(-) delete mode 100644 help.js diff --git a/help.js b/help.js deleted file mode 100644 index 6049131983..0000000000 --- a/help.js +++ /dev/null @@ -1,132 +0,0 @@ -const fs = require("fs-extra"); -const axios = require("axios"); -const path = require("path"); -const { getPrefix } = global.utils; -const { commands, aliases } = global.GoatBot; -const doNotDelete = "[ ๐Ÿ | V2 ]"; // changing this wont change the goatbot V2 of list cmd it is just a decoyy - -module.exports = { - config: { - name: "help", - version: "1.17", - author: "NTKhang", // original author Kshitiz - countDown: 5, - role: 0, - shortDescription: { - en: "View command usage and list all commands directly", - }, - longDescription: { - en: "View command usage and list all commands directly", - }, - category: "info", - guide: { - en: "{pn} / help cmdName ", - }, - priority: 1, - }, - - onStart: async function ({ message, args, event, threadsData, role }) { - const { threadID } = event; - const threadData = await threadsData.get(threadID); - const prefix = getPrefix(threadID); - - if (args.length === 0) { - const categories = {}; - let msg = ""; - - msg += `โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—\n โ˜…๐™ƒ๐™š๐™ฎ ๐™ž๐™–๐™ข XENOZ ๐™œ๐™ค๐™–๐™ฉ๐™—๐™ค๐™ฉ.๐™ˆ๐™ฎ ๐™ฅ๐™ง๐™š๐™›๐™ž๐™ญ . ๐™ข๐™ฎ ๐™ค๐™ฌ๐™ฃ๐™š๐™ง RYUK4ZI ORIG. ๐™๐™—- https://www.facebook.com/profile.php?id=100086747072197&mibextid=kFxxJD ๐Ÿ’\nโ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•`; // replace with your name - - for (const [name, value] of commands) { - if (value.config.role > 1 && role < value.config.role) continue; - - const category = value.config.category || "Uncategorized"; - categories[category] = categories[category] || { commands: [] }; - categories[category].commands.push(name); - } - - Object.keys(categories).forEach((category) => { - if (category !== "info") { - msg += `\nโ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€\nโ”‚ ใ€Ž ${category.toUpperCase()} ใ€`; - - - const names = categories[category].commands.sort(); - for (let i = 0; i < names.length; i += 3) { - const cmds = names.slice(i, i + 3).map((item) => `โœฐ${item}`); - msg += `\nโ”‚ ${cmds.join(" ".repeat(Math.max(1, 10 - cmds.join("").length)))}`; - } - - msg += `\nโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€`; - } - }); - - const totalCommands = commands.size; - msg += `\n๐—–๐˜‚๐—ฟ๐—ฟ๐—ฒ๐—ป๐˜๐—น๐˜†, ๐˜๐—ต๐—ฒ ๐—ฏ๐—ผ๐˜ ๐—ต๐—ฎ๐˜€ ${totalCommands} ๐—ฐ๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ๐˜€ ๐˜๐—ต๐—ฎ๐˜ ๐—ฐ๐—ฎ๐—ป ๐—ฏ๐—ฒ ๐˜‚๐˜€๐—ฒ๐—ฑ\n`; - msg += `๐—ง๐˜†๐—ฝ๐—ฒ ${prefix} ๐—ต๐—ฒ๐—น๐—ฝ ๐—ฐ๐—บ๐—ฑ๐—ก๐—ฎ๐—บ๐—ฒ ๐˜๐—ผ ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐˜๐—ต๐—ฒ ๐—ฑ๐—ฒ๐˜๐—ฎ๐—ถ๐—น๐˜€ ๐—ผ๐—ณ ๐˜๐—ต๐—ฎ๐˜ ๐—ฐ๐—ผ๐—บ๐—บ๐—ฎ๐—ป๐—ฑ\n`; - msg += `๐Ÿ | RYUK4ZI`; // its not decoy so change it if you want - - const helpListImages = [ - "https://i.ibb.co/6mYZLhN/image.jpg", // add image link here - "https://i.ibb.co/qNNtQ7n/image.jpg", - "https://i.ibb.co/ZKYCpcV/image.jpg", - "https://i.ibb.co/0BXSbMN/image.jpg", - "https://i.ibb.co/g36mkXJ/image.jpg", - // Add more image links as needed - ]; - - const helpListImage = helpListImages[Math.floor(Math.random() * helpListImages.length)]; - - await message.reply({ - body: msg, - attachment: await global.utils.getStreamFromURL(helpListImage), - }); - } else { - const commandName = args[0].toLowerCase(); - const command = commands.get(commandName) || commands.get(aliases.get(commandName)); - - if (!command) { - await message.reply(`Command "${commandName}" not found.`); - } else { - const configCommand = command.config; - const roleText = roleTextToString(configCommand.role); - const author = configCommand.author || "Unknown"; - - const longDescription = configCommand.longDescription ? configCommand.longDescription.en || "No description" : "No description"; - - const guideBody = configCommand.guide?.en || "No guide available."; - const usage = guideBody.replace(/{p}/g, prefix).replace(/{n}/g, configCommand.name); - - const response = `โ•ญโ”€โ”€ NAME โ”€โ”€โ”€โ”€โญ“ - โ”‚ ${configCommand.name} - โ”œโ”€โ”€ INFO - โ”‚ Description: ${longDescription} - โ”‚ Other names: ${configCommand.aliases ? configCommand.aliases.join(", ") : "Do not have"} - โ”‚ Other names in your group: Do not have - โ”‚ Version: ${configCommand.version || "1.0"} - โ”‚ Role: ${roleText} - โ”‚ Time per command: ${configCommand.countDown || 1}s - โ”‚ Author: ${author} - โ”œโ”€โ”€ Usage - โ”‚ ${usage} - โ”œโ”€โ”€ Notes - โ”‚ The content inside can be changed - โ”‚ The content inside [a|b|c] is a or b or c - โ•ฐโ”โ”โ”โ”โ”โ”โ”โ–`; - - await message.reply(response); - } - } - }, -}; - -function roleTextToString(roleText) { - switch (roleText) { - case 0: - return "0 (All users)"; - case 1: - return "1 (Group administrators)"; - case 2: - return "2 (Admin bot)"; - default: - return "Unknown role"; - } -} \ No newline at end of file From 97915556be95f84f6618b77ab4c28331fc816d98 Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:52:34 +0545 Subject: [PATCH 94/97] Delete ai.js --- ai.js | 66 ----------------------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 ai.js diff --git a/ai.js b/ai.js deleted file mode 100644 index 55cceddec1..0000000000 --- a/ai.js +++ /dev/null @@ -1,66 +0,0 @@ -const { getPrefix, getStreamFromURL, uploadImgbb } = global.utils; -async function ai({ message: m, event: e, args: a, usersData: u }) { - var p = [`${await getPrefix(e.threadID)}${this.config.name}`, -`${this.config.name}` -/*"ai" -*you can add more prefix here -*/ -]; - if (p.some(b => a[0].toLowerCase().startsWith(b))) { -try { -let prompt = ""; -if (e.type === "message_reply" && e.messageReply.attachments && e.messageReply.attachments[0]?.type === "photo") { - const b = await uploadImgbb(e.messageReply.attachments[0].url); -prompt = a.slice(1).join(" ") + ' ' + b.image.url; -} else { - prompt = a.slice(1).join(" "); -} - var __ = [{ id: e.senderID, tag: await u.getName(e.senderID) }]; - const r = await require("axios").post(`https://test-ai-ihc6.onrender.com/api`, { - prompt: prompt, - apikey: "GayKey-oWHmMb1t8ASljhpgSSUI", - name: __[0]['tag'], - id: __[0]['id'], - }); -var _ = r.data.result.replace(/{name}/g, __[0]['tag']).replace(/{pn}/g, p[0]); - if (r.data.av) { - if (Array.isArray(r.data.av)) { - const avs = r.data.av.map(url => getStreamFromURL(url)); - const avss = await Promise.all(avs); - m.reply({ - body: _, - mentions: __, - attachment: avss - }); - } else { - m.reply({ - body: _, - mentions: __, -attachment: await getStreamFromURL(r.data.av) - }); - } - } else { -m.reply({ -body: _, -mentions: __ - }); - } - } catch (error) { - m.reply("Error " + error); - } - } -} -module.exports = { -config: { - name: "ai", -aliases: [], -version: 1.6, -author: "Jun", -role: 0, - shortDescription: "An AI that can do various tasks", - guide: "{pn} ", - category: "AI" - }, - onStart: function() {}, - onChat: ai -}; \ No newline at end of file From 5bde234c70abd196de4556163e38cbfba6528835 Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Thu, 11 Jul 2024 17:03:16 +0545 Subject: [PATCH 95/97] Delete scripts/cmds/0accept.js --- scripts/cmds/0accept.js | 132 ---------------------------------------- 1 file changed, 132 deletions(-) delete mode 100644 scripts/cmds/0accept.js diff --git a/scripts/cmds/0accept.js b/scripts/cmds/0accept.js deleted file mode 100644 index 6040ef225a..0000000000 --- a/scripts/cmds/0accept.js +++ /dev/null @@ -1,132 +0,0 @@ -const moment = require("moment-timezone"); - -module.exports = { - config: { - name: "accept", - aliases: ['acp'], - version: "1.0", - author: "Loid Butter", - countDown: 8, - role: 2, - shortDescription: "accept users", - longDescription: "accept users", - category: "Utility", - }, - - onReply: async function ({ message, Reply, event, api, commandName }) { - const { author, listRequest, messageID } = Reply; - if (author !== event.senderID) return; - const args = event.body.replace(/ +/g, " ").toLowerCase().split(" "); - - clearTimeout(Reply.unsendTimeout); // Clear the timeout if the user responds within the countdown duration - - const form = { - av: api.getCurrentUserID(), - fb_api_caller_class: "RelayModern", - variables: { - input: { - source: "friends_tab", - actor_id: api.getCurrentUserID(), - client_mutation_id: Math.round(Math.random() * 19).toString() - }, - scale: 3, - refresh_num: 0 - } - }; - - const success = []; - const failed = []; - - if (args[0] === "add") { - form.fb_api_req_friendly_name = "FriendingCometFriendRequestConfirmMutation"; - form.doc_id = "3147613905362928"; - } - else if (args[0] === "del") { - form.fb_api_req_friendly_name = "FriendingCometFriendRequestDeleteMutation"; - form.doc_id = "4108254489275063"; - } - else { - return api.sendMessage("Please select ", event.threadID, event.messageID); - } - - let targetIDs = args.slice(1); - - if (args[1] === "all") { - targetIDs = []; - const lengthList = listRequest.length; - for (let i = 1; i <= lengthList; i++) targetIDs.push(i); - } - - const newTargetIDs = []; - const promiseFriends = []; - - for (const stt of targetIDs) { - const u = listRequest[parseInt(stt) - 1]; - if (!u) { - failed.push(`Can't find stt ${stt} in the list`); - continue; - } - form.variables.input.friend_requester_id = u.node.id; - form.variables = JSON.stringify(form.variables); - newTargetIDs.push(u); - promiseFriends.push(api.httpPost("https://www.facebook.com/api/graphql/", form)); - form.variables = JSON.parse(form.variables); - } - - const lengthTarget = newTargetIDs.length; - for (let i = 0; i < lengthTarget; i++) { - try { - const friendRequest = await promiseFriends[i]; - if (JSON.parse(friendRequest).errors) { - failed.push(newTargetIDs[i].node.name); - } - else { - success.push(newTargetIDs[i].node.name); - } - } - catch (e) { - failed.push(newTargetIDs[i].node.name); - } - } - - if (success.length > 0) { - api.sendMessage(`ยป The ${args[0] === 'add' ? 'friend request' : 'friend request deletion'} has been processed for ${success.length} people:\n\n${success.join("\n")}${failed.length > 0 ? `\nยป The following ${failed.length} people encountered errors: ${failed.join("\n")}` : ""}`, event.threadID, event.messageID); - } else { - api.unsendMessage(messageID); // Unsend the message if the response is incorrect - return api.sendMessage("Invalid response. Please provide a valid response.", event.threadID); - } - - api.unsendMessage(messageID); // Unsend the message after it has been processed - }, - - onStart: async function ({ event, api, commandName }) { - const form = { - av: api.getCurrentUserID(), - fb_api_req_friendly_name: "FriendingCometFriendRequestsRootQueryRelayPreloader", - fb_api_caller_class: "RelayModern", - doc_id: "4499164963466303", - variables: JSON.stringify({ input: { scale: 3 } }) - }; - const listRequest = JSON.parse(await api.httpPost("https://www.facebook.com/api/graphql/", form)).data.viewer.friending_possibilities.edges; - let msg = ""; - let i = 0; - for (const user of listRequest) { - i++; - msg += (`\n${i}. Name: ${user.node.name}` - + `\nID: ${user.node.id}` - + `\nUrl: ${user.node.url.replace("www.facebook", "fb")}` - + `\nTime: ${moment(user.time * 1009).tz("Asia/Manila").format("DD/MM/YYYY HH:mm:ss")}\n`); - } - api.sendMessage(`${msg}\nReply to this message with content: to take action`, event.threadID, (e, info) => { - global.GoatBot.onReply.set(info.messageID, { - commandName, - messageID: info.messageID, - listRequest, - author: event.senderID, - unsendTimeout: setTimeout(() => { - api.unsendMessage(info.messageID); // Unsend the message after the countdown duration - }, this.config.countDown * 1000) // Convert countdown duration to milliseconds - }); - }, event.messageID); - } -}; \ No newline at end of file From c634aad2471ffbc291a840c905d60c41e3f1696d Mon Sep 17 00:00:00 2001 From: Ryukazi <158026107+Ryukazi@users.noreply.github.com> Date: Thu, 11 Jul 2024 17:05:19 +0545 Subject: [PATCH 96/97] Update account.dev.txt --- account.dev.txt | 49 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index 00c3009115..e73178ec6f 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -5,8 +5,8 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:00:04.320Z", - "lastAccessed": "2024-07-11T11:00:04.320Z" + "creation": "2024-07-11T11:19:48.970Z", + "lastAccessed": "2024-07-11T11:19:48.970Z" }, { "key": "dpr", @@ -14,25 +14,52 @@ "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:00:04.320Z", - "lastAccessed": "2024-07-11T11:00:04.320Z" + "creation": "2024-07-11T11:19:48.970Z", + "lastAccessed": "2024-07-11T11:19:48.970Z" + }, + { + "key": "wd", + "value": "774x1420", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-11T11:19:48.970Z", + "lastAccessed": "2024-07-11T11:19:48.970Z" + }, + { + "key": "c_user", + "value": "100053647774607", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-11T11:19:48.970Z", + "lastAccessed": "2024-07-11T11:19:48.970Z" + }, + { + "key": "xs", + "value": "7%3A1avtPTelQ3_ecA%3A2%3A1720696776%3A-1%3A3731", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-11T11:19:48.970Z", + "lastAccessed": "2024-07-11T11:19:48.970Z" }, { "key": "fr", - "value": "0ZqUwmmzkK8S6WyzL..Bmj7sx..AAA.0.0.Bmj7sz.AWVl_9Wb7HA", + "value": "00ONJjva5uJZICW3s.AWXF0rAU-qXAdByAZciK4uT-Z7s.Bmj7s4..AAA.0.0.Bmj7_I.AWUOXC67uO8", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:00:04.320Z", - "lastAccessed": "2024-07-11T11:00:04.320Z" + "creation": "2024-07-11T11:19:48.970Z", + "lastAccessed": "2024-07-11T11:19:48.970Z" }, { - "key": "wd", - "value": "774x1420", + "key": "presence", + "value": "C%7B%22t3%22%3A%5B%5D%2C%22utc3%22%3A1720696786902%2C%22v%22%3A1%7D", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:00:04.320Z", - "lastAccessed": "2024-07-11T11:00:04.320Z" + "creation": "2024-07-11T11:19:48.970Z", + "lastAccessed": "2024-07-11T11:19:48.970Z" } ] From 7a0c13c9cbbc2bdf4c0a534a7bc5ba0c691c07f1 Mon Sep 17 00:00:00 2001 From: Yoursensei918 Date: Thu, 11 Jul 2024 17:10:35 +0545 Subject: [PATCH 97/97] Update account.dev.txt --- account.dev.txt | 120 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 96 insertions(+), 24 deletions(-) diff --git a/account.dev.txt b/account.dev.txt index e73178ec6f..4f3704bfa3 100644 --- a/account.dev.txt +++ b/account.dev.txt @@ -1,65 +1,137 @@ [ + { + "key": "dbln", + "value": "%7B%2261561897235359%22%3A%22G1AeIoIN%22%7D", + "domain": "facebook.com", + "path": "/login/device-based/", + "hostOnly": false, + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" + }, + { + "key": "datr", + "value": "xcSCZoVi-MENQC8C79TyfRHG", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" + }, { "key": "sb", - "value": "-QhTZhjJf2GEgZBewoxTp_Vo", + "value": "xcSCZqidHlJzKrQ5gbB--Gdb", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:19:48.970Z", - "lastAccessed": "2024-07-11T11:19:48.970Z" + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" }, { - "key": "dpr", - "value": "2.5303103923797607", + "key": "ps_n", + "value": "1", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:19:48.970Z", - "lastAccessed": "2024-07-11T11:19:48.970Z" + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" + }, + { + "key": "ps_l", + "value": "1", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" + }, + { + "key": "vpd", + "value": "v1%3B743x393x2.75", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" + }, + { + "key": "locale", + "value": "en_US", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" + }, + { + "key": "m_pixel_ratio", + "value": "2.75", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" }, { "key": "wd", - "value": "774x1420", + "value": "393x743", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" + }, + { + "key": "fr", + "value": "0TQIFjUgqM0fKfx5j.AWUL2FsKzE6sarvLmtBBDAI3UNg.BmgsTF..AAA.0.0.Bmj63D.AWUR_YK52NA", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:19:48.970Z", - "lastAccessed": "2024-07-11T11:19:48.970Z" + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" }, { "key": "c_user", - "value": "100053647774607", + "value": "61561897235359", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:19:48.970Z", - "lastAccessed": "2024-07-11T11:19:48.970Z" + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" }, { "key": "xs", - "value": "7%3A1avtPTelQ3_ecA%3A2%3A1720696776%3A-1%3A3731", + "value": "20%3AkFsTW9z0IpDsYg%3A2%3A1720692163%3A-1%3A-1", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:19:48.970Z", - "lastAccessed": "2024-07-11T11:19:48.970Z" + "creation": "2024-07-11T11:25:09.911Z", + "lastAccessed": "2024-07-11T11:25:09.911Z" }, { - "key": "fr", - "value": "00ONJjva5uJZICW3s.AWXF0rAU-qXAdByAZciK4uT-Z7s.Bmj7s4..AAA.0.0.Bmj7_I.AWUOXC67uO8", + "key": "wl_cbv", + "value": "v2%3Bclient_version%3A2557%3Btimestamp%3A1720692169", + "domain": "facebook.com", + "path": "/", + "hostOnly": false, + "creation": "2024-07-11T11:25:09.912Z", + "lastAccessed": "2024-07-11T11:25:09.912Z" + }, + { + "key": "m_page_voice", + "value": "61561897235359", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:19:48.970Z", - "lastAccessed": "2024-07-11T11:19:48.970Z" + "creation": "2024-07-11T11:25:09.912Z", + "lastAccessed": "2024-07-11T11:25:09.912Z" }, { - "key": "presence", - "value": "C%7B%22t3%22%3A%5B%5D%2C%22utc3%22%3A1720696786902%2C%22v%22%3A1%7D", + "key": "fbl_st", + "value": "100627377%3BT%3A28678285", "domain": "facebook.com", "path": "/", "hostOnly": false, - "creation": "2024-07-11T11:19:48.970Z", - "lastAccessed": "2024-07-11T11:19:48.970Z" + "creation": "2024-07-11T11:25:09.912Z", + "lastAccessed": "2024-07-11T11:25:09.912Z" } ]