queen_amdi_core 1.2.9 โ 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/language/applyLANG.js +1 -1
- package/package.json +1 -1
- package/plugins/Readme.md +13 -0
- package/plugins/_amdi_menu.js +54 -0
- package/plugins/_anti_functions.js +67 -0
- package/plugins/_bot_control.js +242 -0
- package/plugins/_onTEXT.js +29 -0
- package/plugins/apkdl.js +116 -0
- package/plugins/ban.js +61 -0
- package/plugins/deleteMsg.js +73 -0
- package/plugins/downloadSocialMedia.js +130 -0
- package/plugins/downloadYT.js +187 -0
- package/plugins/editor.js +43 -0
- package/plugins/fancy.js +39 -0
- package/plugins/greetings.js +127 -0
- package/plugins/grpManager.js +264 -0
- package/plugins/info.js +85 -0
- package/plugins/misc.js +239 -0
- package/plugins/search.js +83 -0
- package/plugins/settings.js +43 -0
- package/plugins/stickers.js +205 -0
- package/plugins/system_status.js +59 -0
- package/plugins/tags.js +89 -0
- package/plugins/votepolls.js +27 -0
package/language/applyLANG.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
function _0x572ab1(_0xc21569,_0x1c3e41,_0x4cc3a6,_0x4f666f){return _0x4233(_0x1c3e41-0x18,_0x4cc3a6);}(function(_0x3ad090,_0x2f70e6){function _0x2bc47a(_0x3ba877,_0x4c4aec,_0x365336,_0x195de0){return _0x4233(_0x365336-0x8d,_0x4c4aec);}function _0x3de420(_0x6f69d3,_0x18f30a,_0x4b4b06,_0x4015c2){return _0x4233(_0x4b4b06- -0x292,_0x4015c2);}const _0x59d2e9=_0x3ad090();while(!![]){try{const _0x4d15fa=parseInt(_0x3de420(-0x98,-0x9e,-0xa4,-0x9e))/(-0x1970+0xa7*-0x35+0x3c04)*(-parseInt(_0x2bc47a(0x270,0x288,0x27c,0x289))/(0x1*-0x221b+0x10b9+-0x8b2*-0x2))+-parseInt(_0x3de420(-0xad,-0xac,-0xa6,-0x98))/(0x268f*-0x1+-0x6af+0x5*0x90d)+-parseInt(_0x3de420(-0x76,-0x89,-0x8c,-0xa1))/(-0x7*-0x172+-0x3fe+0x44*-0x17)+parseInt(_0x2bc47a(0x296,0x29b,0x289,0x281))/(0x17f3+0xa05+-0xb51*0x3)+parseInt(_0x3de420(-0x95,-0xb3,-0xaa,-0xaa))/(0xbb6+-0x107*0xd+-0x7*-0x3d)+parseInt(_0x2bc47a(0x273,0x284,0x27a,0x268))/(-0xa2a*-0x3+0x2296*0x1+0x5b*-0xb7)*(-parseInt(_0x2bc47a(0x288,0x28e,0x280,0x273))/(0x92*-0x5+-0xae8*-0x1+0x1*-0x806))+parseInt(_0x2bc47a(0x298,0x28c,0x296,0x2a7))/(0x21f0+-0x2*0x557+-0x1739);if(_0x4d15fa===_0x2f70e6)break;else _0x59d2e9['push'](_0x59d2e9['shift']());}catch(_0x5d0fe5){_0x59d2e9['push'](_0x59d2e9['shift']());}}}(_0x4702,-0x3*-0x57b68+0xc296+-0xc101*0xb));function _0x4702(){const _0x43ac85=['34460NQmbWZ','\x20language\x20','.json','agentnox/4','69848fxddkn','/strings/E','ules/queen','../../../a','Settings','\x20as\x20langua','uage\x20[','mdi_core','RHSdt','27565hZRUcq','\x20\x20\x20\x20','ssets/amdi','๐ฅ\x20Setting-','lIlTP','].\x20Default','log','exports','rOQJZ','./node_mod','3146376ccIIjS','Display','applied\x20[E','5935797gGgQpd','ge..','STRINGS','Can\x27t\x20find','getString','node_modul','56bot123','_amdi_core','language','N.json','up\x20','6908496LmmiVz','readFileSy','/strings/','parse','9024rZttTX','203FrqcOE','11UQGOmT'];_0x4702=function(){return _0x43ac85;};return _0x4702();}const {download}=require('../dist/qr'+_0x57a0aa(0x28c,0x29d,0x29d,0x2a0)),fs=require('fs'),{LANGUAGE}=require(_0x572ab1(0x212,0x20e,0x21b,0x1f8)+_0x572ab1(0x209,0x216,0x22c,0x219)+_0x57a0aa(0x27a,0x28d,0x27f,0x284));function _0x4233(_0x161148,_0x42043d){const _0x40ffee=_0x4702();return _0x4233=function(_0x5232ff,_0x26fdd0){_0x5232ff=_0x5232ff-(0x4*0x95+-0x1e4*0xa+-0xbd*-0x19);let _0x19c07f=_0x40ffee[_0x5232ff];return _0x19c07f;},_0x4233(_0x161148,_0x42043d);}async function dl_files(){function _0x453065(_0x55efd6,_0x4c233f,_0x9045e0,_0x254e26){return _0x572ab1(_0x55efd6-0x1c1,_0x4c233f-0x2bc,_0x254e26,_0x254e26-0x6a);}const _0x52eb71={'lIlTP':_0x384292(0x5d9,0x5de,0x5ca,0x5d5),'xvbkh':function(_0x1a3cef,_0x225c45,_0x54f995,_0x287c09){return _0x1a3cef(_0x225c45,_0x54f995,_0x287c09);},'RHSdt':_0x453065(0x4d2,0x4c6,0x4b1,0x4d8)+_0x453065(0x4cb,0x4b7,0x4c2,0x4ad)};function _0x384292(_0x18c818,_0x234a94,_0x1ff544,_0x2f810c){return _0x572ab1(_0x18c818-0x4b,_0x2f810c-0x3c0,_0x234a94,_0x2f810c-0xe9);}_0x52eb71['xvbkh'](download,_0x52eb71[_0x453065(0x4e0,0x4cf,0x4bd,0x4d9)],_0x384292(0x5ad,0x5ca,0x5b7,0x5ba)+'es/queen_a'+_0x384292(0x5c8,0x5e2,0x5e7,0x5d2),function(_0x40b112){function _0xa522fb(_0x504fe7,_0x5c769b,_0x1fe41c,_0x53d5a3){return _0x384292(_0x504fe7-0x127,_0x1fe41c,_0x1fe41c-0x1a6,_0x504fe7- -0x3fe);}console['log'](_0x40b112?_0x40b112:_0x52eb71[_0xa522fb(0x1da,0x1d8,0x1e1,0x1c8)]);});}if(fs['existsSync']('./node_mod'+_0x57a0aa(0x292,0x28b,0x27f,0x27d)+_0x572ab1(0x208,0x1fc,0x1f1,0x20a)+_0x57a0aa(0x28c,0x280,0x283,0x271)+LANGUAGE+'.json')){console[_0x57a0aa(0x2a8,0x298,0x285,0x28c)](_0x57a0aa(0x27f,0x295,0x29c,0x2ab)+_0x572ab1(0x1fb,0x1ff,0x205,0x1fa)+LANGUAGE+(_0x57a0aa(0x2a2,0x28e,0x27d,0x296)+_0x57a0aa(0x2a3,0x2a0,0x29b,0x295)));var json=JSON[_0x57a0aa(0x28f,0x281,0x281,0x28b)](fs['readFileSy'+'nc']('./node_mod'+_0x57a0aa(0x287,0x28b,0x293,0x285)+'_amdi_core'+_0x57a0aa(0x285,0x280,0x295,0x28d)+LANGUAGE+_0x57a0aa(0x291,0x287,0x29a,0x297)));}else{console[_0x57a0aa(0x296,0x298,0x2a5,0x287)](_0x57a0aa(0x2b7,0x2a2,0x2b6,0x291)+'\x20your\x20lang'+_0x572ab1(0x208,0x211,0x20b,0x222)+LANGUAGE+(_0x572ab1(0x22f,0x219,0x223,0x21b)+_0x57a0aa(0x27d,0x286,0x284,0x279)+_0x572ab1(0x225,0x220,0x20f,0x21b)+'nglish].'));var json=JSON[_0x572ab1(0x20e,0x203,0x1fa,0x1ff)](fs[_0x572ab1(0x1f6,0x201,0x211,0x1f9)+'nc'](_0x572ab1(0x22a,0x21d,0x211,0x233)+'ules/queen'+_0x572ab1(0x1e8,0x1fc,0x1ee,0x1f6)+_0x57a0aa(0x284,0x28a,0x29f,0x28c)+_0x57a0aa(0x27d,0x27c,0x28c,0x287)));}function getString(_0x5d91b3){function _0x1a9139(_0x3b991d,_0x94eb7a,_0x35eda6,_0xb885b0){return _0x57a0aa(_0x3b991d-0x17a,_0xb885b0- -0xc,_0x94eb7a,_0xb885b0-0x101);}function _0x169914(_0x14707a,_0x3fb383,_0x2b90a4,_0x499ad3){return _0x572ab1(_0x14707a-0x1b8,_0x14707a- -0x92,_0x2b90a4,_0x499ad3-0x14c);}const _0x557305={};_0x557305['rOQJZ']=_0x1a9139(0x28b,0x2a6,0x2a1,0x295);const _0x9d7874=_0x557305;return json[_0x9d7874[_0x1a9139(0x27c,0x27e,0x280,0x28e)]][_0x5d91b3];}function _0x57a0aa(_0x27ad8f,_0x452385,_0x128bd0,_0x5c346a){return _0x4233(_0x452385-0x96,_0x128bd0);}const _0x22e6c9={};_0x22e6c9[_0x57a0aa(0x287,0x27b,0x27a,0x27f)]=json,_0x22e6c9[_0x572ab1(0x1fb,0x1f9,0x1f7,0x1e8)]=getString,module[_0x57a0aa(0x28e,0x299,0x2af,0x2a3)]=_0x22e6c9;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "queen_amdi_core",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.3.0",
|
4
4
|
"description": "Queen Amdi [WA Multi-device] - A WhatsApp based third party application that provide many services with a real-time automated conversational experience.",
|
5
5
|
"main": "./index.js",
|
6
6
|
"repository": {
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Queen Amdi 4.0v๐๐ปโค๏ธ (Multi-Device version)
|
2
|
+
|
3
|
+
You can join Beta Testing WhatsApp Group by invite link :
|
4
|
+
<a href="https://chat.whatsapp.com/LhWHB9gftfwIv29C4etUHH">Beta Testing Whatsapp Group</a>
|
5
|
+
|
6
|
+
----
|
7
|
+
|
8
|
+
### License
|
9
|
+
This project is protected by the `GNU General Public License v3.0.`
|
10
|
+
Do not edit copyright messages!
|
11
|
+
|
12
|
+
### Disclaimer
|
13
|
+
`WhatsApp` name, its variations and logo are registered trademarks on Facebook. We have nothing to do with the registered trademark.
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/**
|
2
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
3
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
4
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
5
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
6
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
7
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
8
|
+
__ __ _ _ _ ____ _
|
9
|
+
| \/ |_ _| | |_(_) | _ \ _____ _(_) ___ ___
|
10
|
+
| |\/| | | | | | __| |_____| | | |/ _ \ \ / / |/ __/ _ \
|
11
|
+
| | | | |_| | | |_| |_____| |_| | __/\ V /| | (_| __/
|
12
|
+
|_| |_|\__,_|_|\__|_| |____/ \___| \_/ |_|\___\___|
|
13
|
+
* @project_name Queen Amdi [WA Multi-device]
|
14
|
+
* @author BlackAmda <https://github.com/BlackAmda>
|
15
|
+
* @description A WhatsApp based 3สณแต party application that provide many services with a real-time automated conversational experience
|
16
|
+
* @link <https://github.com/BlackAmda/QueenAmdi>
|
17
|
+
* @version 4.0.5
|
18
|
+
* @file _amdi_menu.js - QueenAmdi bot main menu
|
19
|
+
|
20
|
+
ยฉ 2022 Black Amda, ANTECH. All rights reserved.
|
21
|
+
Licensed under the GPL-3.0 License;
|
22
|
+
you may not use this file except in compliance with the License.*/
|
23
|
+
|
24
|
+
const { AMDI, amdiDB, _default, _default_list_sections, Language } = require('queen_amdi_core/dist/scripts');
|
25
|
+
const { getSettings } = amdiDB.settingsDB
|
26
|
+
const { amdiVoice } = _default
|
27
|
+
const { panelList } = _default_list_sections
|
28
|
+
const Lang = Language.getString('amdiMenu');
|
29
|
+
|
30
|
+
/**
|
31
|
+
* @cmdInfos { cmd, desc, example, type, react, cmdHideInMenu }
|
32
|
+
* @cmdTypes primary, download, logo, profile, admin
|
33
|
+
*/
|
34
|
+
|
35
|
+
AMDI({ cmd: ["panel", "list", "menu"], desc: "Queen Amdi Main Menu", type: "primary", react: "๐" }, (async (amdiWA) => {
|
36
|
+
let { input, prefix, sendAudioMsg, sendListMsg, msgDevice, sendername } = amdiWA.msgLayout;
|
37
|
+
|
38
|
+
if (input) return;
|
39
|
+
|
40
|
+
const audioURL = amdiVoice
|
41
|
+
const pttStatus = true
|
42
|
+
let mimeType = msgDevice == 'ios' ? 'audio/mp4' : 'audio/ogg; codecs=opus'
|
43
|
+
await sendAudioMsg({ url: audioURL }, {mimetype: mimeType, ptt: pttStatus});
|
44
|
+
const PANEL_HEADER = await getSettings('PANEL_HEADER');
|
45
|
+
let text = !PANEL_HEADER.input || PANEL_HEADER.input == 'default' ? `\n*Hello!* ${sendername}` + Lang.panelText : PANEL_HEADER.input.keywords();
|
46
|
+
|
47
|
+
var listInfo = {}
|
48
|
+
listInfo.title = Lang.panelTitle
|
49
|
+
listInfo.text = text
|
50
|
+
listInfo.buttonTXT = 'Select category'
|
51
|
+
|
52
|
+
const sections = panelList(prefix);
|
53
|
+
return await sendListMsg(listInfo, sections);
|
54
|
+
}));
|
@@ -0,0 +1,67 @@
|
|
1
|
+
/**
|
2
|
+
* @project_name Queen Amdi [WA Multi-device]
|
3
|
+
* @author BlackAmda <https://github.com/BlackAmda>
|
4
|
+
* @description A WhatsApp based 3สณแต party application that provide many services with a real-time automated conversational experience
|
5
|
+
* @link <https://github.com/BlackAmda/QueenAmdi>
|
6
|
+
* @version 4.0.5
|
7
|
+
* @file _anti_functions.js - QueenAmdi anti-bad words, anti-links
|
8
|
+
|
9
|
+
ยฉ 2022 Black Amda, ANTECH. All rights reserved.
|
10
|
+
Licensed under the GPL-3.0 License;
|
11
|
+
you may not use this file except in compliance with the License.*/
|
12
|
+
|
13
|
+
const { AMDI, amdiDB, antifunctions, Language } = require('queen_amdi_core/dist/scripts')
|
14
|
+
const { getSettings } = amdiDB.settingsDB
|
15
|
+
const { getGrpSettings } = amdiDB.grpSetDB
|
16
|
+
const Lang = Language.getString('anti_functions')
|
17
|
+
|
18
|
+
AMDI({ onText: "all_words", cmdHideInMenu: true }, (async (amdiWA, textMSG) => {
|
19
|
+
let { isSUDO, deleteKEY, isGroup, isGroupAdmin, isBotGroupAdmin, senderjid, sendText } = amdiWA.msgLayout;
|
20
|
+
|
21
|
+
if (amdiWA.fromMe || !isGroup || !isBotGroupAdmin || isGroupAdmin || isSUDO) return;
|
22
|
+
|
23
|
+
const antibad = await getGrpSettings('ANTI_BAD_WORDS', amdiWA.clientJID);
|
24
|
+
|
25
|
+
const ANTIBADMSG = await getSettings('ANTIBADMSG');
|
26
|
+
let antiBADMSG = !ANTIBADMSG.input ? Lang.badwordkick : ANTIBADMSG.input
|
27
|
+
|
28
|
+
if (antibad.input !== "false") {
|
29
|
+
const isBadWord = await antifunctions.antiBad(amdiWA, textMSG);
|
30
|
+
if (isBadWord && antibad.input == "kick") {
|
31
|
+
await sendText(`@${senderjid.split('@')[0]}, ${antiBADMSG}`, { mentionJIDS: [senderjid] });
|
32
|
+
return await amdiWA.web.groupParticipantsUpdate(amdiWA.clientJID, [senderjid], "remove");
|
33
|
+
}
|
34
|
+
else if (isBadWord && antibad.input == "deletemsg") {
|
35
|
+
await sendText(`@${senderjid.split('@')[0]}, ${antiBADMSG}`, { mentionJIDS: [senderjid] });
|
36
|
+
return await deleteKEY(amdiWA.msg.key);
|
37
|
+
}
|
38
|
+
else if (isBadWord && antibad.input == "deletekick") {
|
39
|
+
await sendText(`@${senderjid.split('@')[0]}, ${antiBADMSG}`, { mentionJIDS: [senderjid] });
|
40
|
+
await deleteKEY(amdiWA.msg.key);
|
41
|
+
return await amdiWA.web.groupParticipantsUpdate(amdiWA.clientJID, [senderjid], "remove");
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}));
|
45
|
+
|
46
|
+
|
47
|
+
AMDI({ onText: "all_words", cmdHideInMenu: true }, (async (amdiWA, textMSG) => {
|
48
|
+
let { isSUDO, deleteKEY, isGroup, isGroupAdmin, isBotGroupAdmin, senderjid, sendText } = amdiWA.msgLayout;
|
49
|
+
|
50
|
+
if (amdiWA.isCmd) return;
|
51
|
+
if (amdiWA.fromMe || !isGroup || !isBotGroupAdmin || isGroupAdmin || isSUDO) return;
|
52
|
+
|
53
|
+
const isAntiLink = await antifunctions.antiLink(textMSG, amdiWA.clientJID);
|
54
|
+
if (!isAntiLink) return;
|
55
|
+
|
56
|
+
const ANTILINKMSG = await getSettings('ANTIKICKMSG');
|
57
|
+
let antiKICKMSG = !ANTILINKMSG.input ? Lang.antilinkkick : ANTILINKMSG.input
|
58
|
+
|
59
|
+
if (isAntiLink === "kick") {
|
60
|
+
await sendText(`@${senderjid.split('@')[0]}, ${antiKICKMSG}`, { mentionJIDS: [senderjid] });
|
61
|
+
await amdiWA.web.groupParticipantsUpdate(amdiWA.clientJID, [senderjid], "remove");
|
62
|
+
return await deleteKEY(amdiWA.msg.key);
|
63
|
+
} else if (isAntiLink === "delete" || isAntiLink === "null") {
|
64
|
+
await sendText(`@${senderjid.split('@')[0]}, ${antiKICKMSG}`, { mentionJIDS: [senderjid] });
|
65
|
+
return await deleteKEY(amdiWA.msg.key);
|
66
|
+
}
|
67
|
+
}));
|
@@ -0,0 +1,242 @@
|
|
1
|
+
/**
|
2
|
+
* @project_name Queen Amdi [WA Multi-device]
|
3
|
+
* @author BlackAmda <https://github.com/BlackAmda>
|
4
|
+
* @description A WhatsApp based 3สณแต party application that provide many services with a real-time automated conversational experience
|
5
|
+
* @link <https://github.com/BlackAmda/QueenAmdi>
|
6
|
+
* @version 4.0.1
|
7
|
+
* @file _bot_control.js - QueenAmdi bot control commands
|
8
|
+
|
9
|
+
ยฉ 2022 Black Amda, ANTECH. All rights reserved.
|
10
|
+
Licensed under the GPL-3.0 License;
|
11
|
+
you may not use this file except in compliance with the License.*/
|
12
|
+
|
13
|
+
const { AMDI, amdiDB, _default, _default_list_sections, Language, restore } = require('queen_amdi_core/dist/scripts')
|
14
|
+
const { addStarRates, checkJID, getStarRates, resetRates } = amdiDB.rateDB
|
15
|
+
const { getAntiLink, insertAntiLink, resetAntiLinkDB } = amdiDB.antilinkDB
|
16
|
+
const { inputSettings, getSettingsList, resetSettingsDB } = amdiDB.settingsDB
|
17
|
+
const { getGrpSettingsList, resetGrpSettingsDB } = amdiDB.grpSetDB
|
18
|
+
const { getMiscData, getMiscDataList } = amdiDB.miscDB
|
19
|
+
const { getAllDelJids, getBanJidList, resetBanDB, resetDelAllDB } = amdiDB.ban_jidDB
|
20
|
+
const { getAllWelcome, getAllBye, resetWelcomeDB, resetByeDB } = amdiDB.greetingsDB
|
21
|
+
const { rateList, reactList, resetLIST, rateText } = _default_list_sections
|
22
|
+
const getRandom = (ext) => { return `${Math.floor(Math.random() * 10000)}${ext}` };
|
23
|
+
const fs = require('fs');
|
24
|
+
const { writeFile } = require('fs/promises');
|
25
|
+
const Lang = Language.getString('botCTRL');
|
26
|
+
|
27
|
+
AMDI({ cmd: "restart", desc: "Restart the bot", type: "profile", react: "๐" }, (async (amdiWA) => {
|
28
|
+
let { reply, restart_sys } = amdiWA.msgLayout
|
29
|
+
|
30
|
+
await reply('*Restarting...*');
|
31
|
+
await restart_sys();
|
32
|
+
}));
|
33
|
+
|
34
|
+
|
35
|
+
AMDI({ cmd: "stop", desc: "Stop the bot", type: "profile", react: "๐ด" }, (async (amdiWA) => {
|
36
|
+
let { reply } = amdiWA.msgLayout
|
37
|
+
|
38
|
+
await reply('*Bot is shutting down...*\n\n_(You have to manually turn on the bot!)_');
|
39
|
+
process.exit(1);
|
40
|
+
}));
|
41
|
+
|
42
|
+
|
43
|
+
AMDI({ cmd: "backup", desc: Lang.backupDESC, type: "profile", react: "๐ค" }, (async (amdiWA) => {
|
44
|
+
let { reply, sendDocument } = amdiWA.msgLayout
|
45
|
+
|
46
|
+
try {
|
47
|
+
const settingsDB = await getSettingsList();
|
48
|
+
const settingsFILE = `SettingsBackup_${amdiWA.msg.messageTimestamp}.amdi`
|
49
|
+
const contentset = JSON.stringify(settingsDB)
|
50
|
+
let bufferset = Buffer.from(contentset)
|
51
|
+
await writeFile(settingsFILE, bufferset);
|
52
|
+
await sendDocument(fs.readFileSync('./' + settingsFILE), { mimetype: _default.amdiMIMETYPE, fileName: settingsFILE, quoted: true });
|
53
|
+
|
54
|
+
const grpsettingsDB = await getGrpSettingsList();
|
55
|
+
const grpsettingsFILE = `GroupSettingsBackup_${amdiWA.msg.messageTimestamp}.amdi`
|
56
|
+
const grpcontentset = JSON.stringify(grpsettingsDB)
|
57
|
+
let buffergrpset = Buffer.from(grpcontentset)
|
58
|
+
await writeFile(grpsettingsFILE, buffergrpset);
|
59
|
+
await sendDocument(fs.readFileSync('./' + grpsettingsFILE), { mimetype: _default.amdiMIMETYPE, fileName: grpsettingsFILE, quoted: true });
|
60
|
+
|
61
|
+
const ratingsDB = await getStarRates();
|
62
|
+
const ratingsFILE = `RatesBackup_${amdiWA.msg.messageTimestamp}.amdi`
|
63
|
+
const ratingscontent = JSON.stringify(ratingsDB)
|
64
|
+
let bufferratings = Buffer.from(ratingscontent)
|
65
|
+
await writeFile(ratingsFILE, bufferratings);
|
66
|
+
await sendDocument(fs.readFileSync('./' + ratingsFILE), { mimetype: _default.amdiMIMETYPE, fileName: ratingsFILE, quoted: true });
|
67
|
+
|
68
|
+
const delallDB = await getAllDelJids();
|
69
|
+
const delallFILE = `DelAllJIDBackup_${amdiWA.msg.messageTimestamp}.amdi`
|
70
|
+
const contentdel = JSON.stringify(delallDB)
|
71
|
+
let bufferdel = Buffer.from(contentdel)
|
72
|
+
await writeFile(delallFILE, bufferdel);
|
73
|
+
await sendDocument(fs.readFileSync('./' + delallFILE), { mimetype: _default.amdiMIMETYPE, fileName: delallFILE, quoted: true });
|
74
|
+
|
75
|
+
const banDB = await getBanJidList();
|
76
|
+
const banFILE = `BanJIDBackup_${amdiWA.msg.messageTimestamp}.amdi`
|
77
|
+
const contentban = JSON.stringify(banDB)
|
78
|
+
let bufferban = Buffer.from(contentban)
|
79
|
+
await writeFile(banFILE, bufferban);
|
80
|
+
await sendDocument(fs.readFileSync('./' + banFILE), { mimetype: _default.amdiMIMETYPE, fileName: banFILE, quoted: true });
|
81
|
+
|
82
|
+
const welcomeDB = await getAllWelcome();
|
83
|
+
const welcomeFILE = `WelcomeNoteBackup_${amdiWA.msg.messageTimestamp}.amdi`
|
84
|
+
const contentwelcome = JSON.stringify(welcomeDB)
|
85
|
+
let bufferwelcome = Buffer.from(contentwelcome)
|
86
|
+
await writeFile(welcomeFILE, bufferwelcome);
|
87
|
+
await sendDocument(fs.readFileSync('./' + welcomeFILE), { mimetype: _default.amdiMIMETYPE, fileName: welcomeFILE, quoted: true });
|
88
|
+
|
89
|
+
const byeDB = await getAllBye();
|
90
|
+
const byeFILE = `ByeNoteBackup_${amdiWA.msg.messageTimestamp}.amdi`
|
91
|
+
const contentbye = JSON.stringify(byeDB)
|
92
|
+
let bufferbye = Buffer.from(contentbye)
|
93
|
+
await writeFile(byeFILE, bufferbye);
|
94
|
+
return await sendDocument(fs.readFileSync('./' + byeFILE), { mimetype: _default.amdiMIMETYPE, fileName: byeFILE, quoted: true });
|
95
|
+
} catch (e) {
|
96
|
+
console.log(e);
|
97
|
+
return await reply("Error".fetchError(e), "โ", 1);
|
98
|
+
}
|
99
|
+
}));
|
100
|
+
|
101
|
+
|
102
|
+
AMDI({ cmd: "restore", desc: Lang.restoreDESC, type: "profile", react: "๐ฅ" }, (async (amdiWA) => {
|
103
|
+
await restore();
|
104
|
+
}));
|
105
|
+
|
106
|
+
|
107
|
+
AMDI({ cmd: "reset", desc: Lang.resetDESC, type: "profile", react: "๐ฎ" }, (async (amdiWA) => {
|
108
|
+
let { input, prefix, reply, sendListMsg, resetconnectionDB } = amdiWA.msgLayout
|
109
|
+
|
110
|
+
try {
|
111
|
+
switch (input) {
|
112
|
+
default:
|
113
|
+
var listInfo = {}
|
114
|
+
listInfo.title = Lang.resetDBtitle
|
115
|
+
listInfo.text = Lang.resetDBtxt
|
116
|
+
listInfo.buttonTXT = 'default'
|
117
|
+
await sendListMsg(listInfo, resetLIST(prefix));
|
118
|
+
break;
|
119
|
+
|
120
|
+
case 'connectionDB':
|
121
|
+
await reply(Lang.resetted.format(input), "โ๏ธ");
|
122
|
+
await reply('Bot disconnected!', "โ")
|
123
|
+
await resetconnectionDB();
|
124
|
+
break;
|
125
|
+
|
126
|
+
case 'BanDB':
|
127
|
+
await resetBanDB();
|
128
|
+
await reply(Lang.resetted.format(input), "โ๏ธ");
|
129
|
+
break;
|
130
|
+
|
131
|
+
case 'DellAllDB':
|
132
|
+
await resetDelAllDB();
|
133
|
+
await reply(Lang.resetted.format(input), "โ๏ธ");
|
134
|
+
break;
|
135
|
+
|
136
|
+
case 'WelcomeDB':
|
137
|
+
await resetWelcomeDB();
|
138
|
+
await reply(Lang.resetted.format(input), "โ๏ธ");
|
139
|
+
break;
|
140
|
+
|
141
|
+
case 'ByeDB':
|
142
|
+
await resetByeDB();
|
143
|
+
await reply(Lang.resetted.format(input), "โ๏ธ");
|
144
|
+
break;
|
145
|
+
|
146
|
+
case 'SettingsDB':
|
147
|
+
await resetSettingsDB();
|
148
|
+
await inputSettings('WORK_TYPE', 'private');
|
149
|
+
await inputSettings('PREFIX', '.');
|
150
|
+
await inputSettings('MODERATOR', 'no moderators added')
|
151
|
+
await reply(Lang.resetted.format(input), "โ๏ธ");
|
152
|
+
break;
|
153
|
+
|
154
|
+
case 'GroupSettingsDB':
|
155
|
+
await resetGrpSettingsDB();
|
156
|
+
await reply(Lang.resetted.format(input), "โ๏ธ");
|
157
|
+
break;
|
158
|
+
|
159
|
+
case 'RatesDB':
|
160
|
+
await resetRates();
|
161
|
+
await reply(Lang.resetted.format(input), "โ๏ธ");
|
162
|
+
break;
|
163
|
+
|
164
|
+
case 'AntiLinkDB':
|
165
|
+
await resetAntiLinkDB();
|
166
|
+
await reply(Lang.resetted.format(input), "โ๏ธ");
|
167
|
+
break;
|
168
|
+
|
169
|
+
case 'allDB':
|
170
|
+
await resetAntiLinkDB();
|
171
|
+
await resetBanDB();
|
172
|
+
await resetDelAllDB();
|
173
|
+
await resetWelcomeDB();
|
174
|
+
await resetGrpSettingsDB();
|
175
|
+
await resetByeDB();
|
176
|
+
await resetSettingsDB();
|
177
|
+
await resetRates();
|
178
|
+
await reply(Lang.allDB, "โ๏ธ");
|
179
|
+
await resetconnectionDB();
|
180
|
+
break;
|
181
|
+
};
|
182
|
+
} catch (e) {
|
183
|
+
console.log(e);
|
184
|
+
return await reply("Error".fetchError(e), "โ", 1);
|
185
|
+
}
|
186
|
+
}));
|
187
|
+
|
188
|
+
|
189
|
+
AMDI({ cmd: "rate", desc: Lang.rateDESC, type: "primary", react: "โจ" }, (async (amdiWA) => {
|
190
|
+
let { input, prefix, reply, sender, sendButtonMsg, sendListMsg } = amdiWA.msgLayout
|
191
|
+
|
192
|
+
if (!input) {
|
193
|
+
const botname = await getMiscData('BOTNAME');
|
194
|
+
let BOTNAME = !botname.data ? 'Queen Amdi' : botname.data
|
195
|
+
|
196
|
+
var listInfo = {}
|
197
|
+
listInfo.title = Lang.ratesTitle.format(BOTNAME)
|
198
|
+
listInfo.buttonTXT = 'Select a rating'
|
199
|
+
listInfo.text = await rateText();
|
200
|
+
return await sendListMsg(listInfo, rateList(prefix));
|
201
|
+
}
|
202
|
+
|
203
|
+
switch (input) { case 'one': case 'two': case 'three': case 'four': case 'five':
|
204
|
+
const isRated = await checkJID(sender, input);
|
205
|
+
if (isRated) return await reply(Lang.alreadyRATED.format(input));
|
206
|
+
console.log(sender)
|
207
|
+
await addStarRates(sender, input);
|
208
|
+
await reply(Lang.rated.format(input, input == 'five' ? '๐คฉ' : '๐'), "โ๏ธ");
|
209
|
+
//await sendButtonMsg(yesorno(prefix, 'rate', 'thankyou'), Lang.rated.format(input), tagMsg = true);
|
210
|
+
break;
|
211
|
+
};
|
212
|
+
}));
|
213
|
+
|
214
|
+
AMDI({ cmd: "clear", desc: Lang.clearDESC, type: "profile", react: "๐ฎ" }, (async (amdiWA) => {
|
215
|
+
let { lastMessage, reply } = amdiWA.msgLayout;
|
216
|
+
|
217
|
+
await amdiWA.web.chatModify({ delete: true, lastMessages: lastMessage}, amdiWA.clientJID);
|
218
|
+
return reply("๐ฎ Chat Cleared!");
|
219
|
+
}));
|
220
|
+
|
221
|
+
AMDI({ cmd: "reacts", desc: Lang.RL_DESC, type: "profile", react: "๐" }, (async (amdiWA) => {
|
222
|
+
let { input, prefix, sendListMsg } = amdiWA.msgLayout
|
223
|
+
|
224
|
+
if (!input) {
|
225
|
+
const botname = await getMiscData('BOTNAME');
|
226
|
+
const miscData = await getMiscDataList();
|
227
|
+
let BOTNAME = !botname.data ? 'Queen Amdi' : botname.data
|
228
|
+
|
229
|
+
var listInfo = {}
|
230
|
+
listInfo.title = Lang.RL_Title.format(BOTNAME)
|
231
|
+
listInfo.buttonTXT = 'default'
|
232
|
+
listInfo.text = Lang.RL_Text;
|
233
|
+
return await sendListMsg(listInfo, reactList(prefix, miscData));
|
234
|
+
}
|
235
|
+
}));
|
236
|
+
|
237
|
+
AMDI({ cmd: "clean", desc: "Reset process control limits", type: "profile", react: "โป๏ธ" }, (async (amdiWA) => {
|
238
|
+
let { clearProcess, reply } = amdiWA.msgLayout;
|
239
|
+
|
240
|
+
clearProcess();
|
241
|
+
return reply("โป๏ธ Reset process controller!");
|
242
|
+
}));
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* @project_name Queen Amdi [WA Multi-device]
|
3
|
+
* @author BlackAmda <https://github.com/BlackAmda>
|
4
|
+
* @description A WhatsApp based 3สณแต party application that provide many services with a real-time automated conversational experience
|
5
|
+
* @link <https://github.com/BlackAmda/QueenAmdi>
|
6
|
+
* @version 4.0.5
|
7
|
+
* @file _onTEXT.js - QueenAmdi on text commands
|
8
|
+
|
9
|
+
ยฉ 2022 Black Amda, ANTECH. All rights reserved.
|
10
|
+
Licensed under the GPL-3.0 License;
|
11
|
+
you may not use this file except in compliance with the License.*/
|
12
|
+
|
13
|
+
const { AMDI, amdiChat, Language } = require('queen_amdi_core/dist/scripts')
|
14
|
+
const { semiAIchat } = amdiChat
|
15
|
+
const Lang = Language.getString('botCTRL');
|
16
|
+
|
17
|
+
AMDI({ onText: "Amdi", desc: Lang.AI_USAGE, example: Lang.AI_EXAMPLE, type: "primary", react: "๐ค" }, (async (amdiWA) => {
|
18
|
+
let { input, reply } = amdiWA.msgLayout
|
19
|
+
|
20
|
+
if (!input) return await reply(`${Lang.AI_USAGE}\n\nExample: ${Lang.AI_EXAMPLE}`);
|
21
|
+
await semiAIchat( amdiWA );
|
22
|
+
}));
|
23
|
+
|
24
|
+
AMDI({ onText: "เถเถธเทเถฉเท", desc: "AI Chat bot", type: "primary", react: "๐ค", cmdHideInMenu: true }, (async (amdiWA) => {
|
25
|
+
let { input, reply } = amdiWA.msgLayout
|
26
|
+
|
27
|
+
if (!input) return await reply(`${Lang.AI_USAGE}\n\nExample: ${Lang.AI_EXAMPLE}`);
|
28
|
+
await semiAIchat( amdiWA );
|
29
|
+
}));
|
package/plugins/apkdl.js
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
/**
|
2
|
+
* @project_name Queen Amdi [WA Multi-device]
|
3
|
+
* @author BlackAmda <https://github.com/BlackAmda>
|
4
|
+
* @description A WhatsApp based 3สณแต party application that provide many services with a real-time automated conversational experience
|
5
|
+
* @link <https://github.com/BlackAmda/QueenAmdi>
|
6
|
+
* @version 4.0.5
|
7
|
+
* @file apkdl.js - QueenAmdi APK Downloaders
|
8
|
+
|
9
|
+
ยฉ 2022 Black Amda, ANTECH. All rights reserved.
|
10
|
+
Licensed under the GPL-3.0 License;
|
11
|
+
you may not use this file except in compliance with the License.*/
|
12
|
+
|
13
|
+
const { AMDI, _default_list_sections, fmmod_com, Language, blackamda_API, apkDL_List } = require('queen_amdi_core/dist/scripts')
|
14
|
+
const axios = require("axios")
|
15
|
+
const { fmmods_packages } = _default_list_sections
|
16
|
+
const Lang = Language.getString('misc');
|
17
|
+
|
18
|
+
AMDI({ cmd: "fmmods", desc: "Fouad-whatsapp mods downloader", type: "download", react: "๐ฑ" }, (async (amdiWA) => {
|
19
|
+
let { footerTXT, input, prefix, react, reply, sendDocument, sendListMsg } = amdiWA.msgLayout;
|
20
|
+
|
21
|
+
const fmmods = await fmmod_com();
|
22
|
+
var listInfo = {}
|
23
|
+
listInfo.title = '๐ฑ Fouad-whatsapp mods downloader'
|
24
|
+
listInfo.text = `
|
25
|
+
Download FMWA latest version apk from here.
|
26
|
+
|
27
|
+
By original FM Mods site:
|
28
|
+
https://fmmods.com/fouad-whatsapp/
|
29
|
+
`
|
30
|
+
listInfo.buttonTXT = 'Choose a package'
|
31
|
+
|
32
|
+
if (!input) {
|
33
|
+
return await sendListMsg(listInfo, fmmods_packages(prefix));
|
34
|
+
}
|
35
|
+
|
36
|
+
await react("โฌ๏ธ");
|
37
|
+
try {
|
38
|
+
switch (input) {
|
39
|
+
case '1':
|
40
|
+
await react("โฌ๏ธ");
|
41
|
+
await sendDocument({ url: fmmods['com.whatsapp'].link }, { mimetype: 'application/vnd.android.package-archive', fileName: fmmods['com.whatsapp'].name, caption: footerTXT, quoted: true });
|
42
|
+
await react("โ๏ธ");
|
43
|
+
break;
|
44
|
+
|
45
|
+
case '2':
|
46
|
+
await react("โฌ๏ธ");
|
47
|
+
await sendDocument({ url: fmmods['com.fmwhatsapp'].link }, { mimetype: 'application/vnd.android.package-archive', fileName: fmmods['com.fmwhatsapp'].name, caption: footerTXT, quoted: true });
|
48
|
+
await react("โ๏ธ");
|
49
|
+
break;
|
50
|
+
|
51
|
+
case '3':
|
52
|
+
await react("โฌ๏ธ");
|
53
|
+
await sendDocument({ url: fmmods['com.gbwhatsapp'].link }, { mimetype: 'application/vnd.android.package-archive', fileName: fmmods['com.gbwhatsapp'].name, caption: footerTXT, quoted: true });
|
54
|
+
await react("โ๏ธ");
|
55
|
+
break;
|
56
|
+
|
57
|
+
case '4':
|
58
|
+
await react("โฌ๏ธ");
|
59
|
+
await sendDocument({ url: fmmods['com.yowhatsapp'].link }, { mimetype: 'application/vnd.android.package-archive', fileName: fmmods['com.yowhatsapp'].name, caption: footerTXT, quoted: true });
|
60
|
+
await react("โ๏ธ");
|
61
|
+
break;
|
62
|
+
}
|
63
|
+
} catch (e) {
|
64
|
+
console.log(e);
|
65
|
+
return await reply("Error".fetchError(e), "โ", 1);
|
66
|
+
}
|
67
|
+
}));
|
68
|
+
|
69
|
+
|
70
|
+
AMDI({ cmd: "apk", desc: Lang.APKDL_DESC, type: "download", react: "๐ฆ" }, (async (amdiWA) => {
|
71
|
+
let { input, isPlaystore, sendCustomButton, sendListMsg, prefix, react, reply } = amdiWA.msgLayout;
|
72
|
+
|
73
|
+
if (!input) return await reply(Lang.APK_EXAMPLE, "โ");
|
74
|
+
|
75
|
+
try {
|
76
|
+
if (input && isPlaystore(input)) {
|
77
|
+
const psAPI = await blackamda_API("playstore", `package=${input}`, amdiWA.botNumberJid);
|
78
|
+
const response = await axios.get(psAPI);
|
79
|
+
const json = response.data
|
80
|
+
|
81
|
+
if (json.status.error) return await reply("Error".fetchError([{ message: json.status.message }]), "โ", 1);
|
82
|
+
if (json.size.isLarge) return await reply(Lang.OVER_WA_FILE);
|
83
|
+
|
84
|
+
await react("โฌ๏ธ");
|
85
|
+
const buttons = [
|
86
|
+
{ buttonId: `${prefix}ps ${input}`, buttonText: { displayText: 'โน๏ธ App Info' }, type: 1 }
|
87
|
+
]
|
88
|
+
|
89
|
+
const text = `${Lang.APK_TITLE}
|
90
|
+
๐ App name: ${json.app_name}
|
91
|
+
๐งฐ Version: ${json.version}`
|
92
|
+
|
93
|
+
await react("โฌ๏ธ");
|
94
|
+
await sendCustomButton(buttons, text, true, "apk", json.dl_link, `${json.app_name}.apk`);
|
95
|
+
return await react("โ๏ธ");
|
96
|
+
} else if (input) {
|
97
|
+
const psAPI = await blackamda_API("search", `platform=playstore&name=${input}`, amdiWA.botNumberJid);
|
98
|
+
const response = await axios.get(psAPI);
|
99
|
+
const json = response.data
|
100
|
+
|
101
|
+
if (json.status.error) return await reply("Error".fetchError({ message: json.status.message }), "โ", 1);
|
102
|
+
|
103
|
+
var listInfo = {}
|
104
|
+
listInfo.title = Lang.APK_TITLE
|
105
|
+
listInfo.text = Lang.APK_TXT
|
106
|
+
listInfo.buttonTXT = 'Select app'
|
107
|
+
|
108
|
+
const sections = apkDL_List(prefix, json.data);
|
109
|
+
|
110
|
+
return await sendListMsg(listInfo, sections)
|
111
|
+
}
|
112
|
+
} catch (e) {
|
113
|
+
console.log(e);
|
114
|
+
return await reply("Error".fetchError(e), "โ", 1);
|
115
|
+
}
|
116
|
+
}));
|
package/plugins/ban.js
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
/**
|
2
|
+
* @project_name Queen Amdi [WA Multi-device]
|
3
|
+
* @author BlackAmda <https://github.com/BlackAmda>
|
4
|
+
* @description A WhatsApp based 3สณแต party application that provide many services with a real-time automated conversational experience
|
5
|
+
* @link <https://github.com/BlackAmda/QueenAmdi>
|
6
|
+
* @version 4.0.5
|
7
|
+
* @file ban.js - QueenAmdi group/user ban manager
|
8
|
+
|
9
|
+
ยฉ 2022 Black Amda, ANTECH. All rights reserved.
|
10
|
+
Licensed under the GPL-3.0 License;
|
11
|
+
you may not use this file except in compliance with the License.*/
|
12
|
+
|
13
|
+
const { AMDI, amdiDB, ban, Language } = require('queen_amdi_core/dist/scripts')
|
14
|
+
const { banRows, banUSER, banGROUP } = ban
|
15
|
+
const { removeBanJids, getBanJidList } = amdiDB.ban_jidDB
|
16
|
+
const Lang = Language.getString('ban');
|
17
|
+
|
18
|
+
|
19
|
+
AMDI({ cmd: "ban", desc: Lang.bandesc, example: Lang.banEx, type: "profile", react: "โ" }, (async (amdiWA) => {
|
20
|
+
let { botNumberJid, input, allowedNumbs, groupMetadata } = amdiWA.msgLayout;
|
21
|
+
|
22
|
+
if (input.includes('user')) {
|
23
|
+
await banUSER(input, botNumberJid, allowedNumbs)
|
24
|
+
}
|
25
|
+
|
26
|
+
if (input.includes('group')) {
|
27
|
+
await banGROUP(input, botNumberJid, allowedNumbs, groupMetadata)
|
28
|
+
}
|
29
|
+
}));
|
30
|
+
|
31
|
+
|
32
|
+
AMDI({ cmd: "unban", desc: Lang.unbandesc, example: Lang.unbanEx, type: "profile", react: "โ๏ธ" }, (async (amdiWA) => {
|
33
|
+
let { isGroup, reply, taggedJid } = amdiWA.msgLayout;
|
34
|
+
|
35
|
+
if (isGroup) {
|
36
|
+
if (!amdiWA.msg.message.extendedTextMessage) return reply(Lang.unbanEx)
|
37
|
+
await removeBanJids(taggedJid)
|
38
|
+
return await reply(`โ
*Unbanned*`, "๐");
|
39
|
+
} else if (!isGroup) {
|
40
|
+
await removeBanJids(amdiWA.clientJID)
|
41
|
+
return await reply(`โ
*Unbanned*`, "๐");
|
42
|
+
} else {
|
43
|
+
return reply(Lang.unbanEx)
|
44
|
+
}
|
45
|
+
}));
|
46
|
+
|
47
|
+
|
48
|
+
AMDI({ cmd: "banlist", desc: Lang.banlistDESC, type: "profile", react: "๐" }, (async (amdiWA) => {
|
49
|
+
let { prefix, reply, sendListMsg } = amdiWA.msgLayout;
|
50
|
+
|
51
|
+
var listInfo = {}
|
52
|
+
listInfo.title = Lang.banListTitle
|
53
|
+
listInfo.text = Lang.banListText
|
54
|
+
listInfo.buttonTXT = 'default'
|
55
|
+
|
56
|
+
var banList = await getBanJidList();
|
57
|
+
const rows = await banRows(prefix, banList)
|
58
|
+
if (rows == '') return reply('*No ban users or groups*', "๐")
|
59
|
+
const sections = [{ title: "Ban JIDs list", rows: rows }]
|
60
|
+
return await sendListMsg(listInfo, sections);
|
61
|
+
}));
|