Discord_API_Bot/index.js

1 line
16 KiB
JavaScript
Raw Normal View History

2024-04-02 03:59:09 +01:00
const a6_0x51a76c=a6_0x1c7b;(function(_0x506561,_0x10c52c){const _0xcf328a=a6_0x1c7b,_0x2c6699=_0x506561();while(!![]){try{const _0xb87121=-parseInt(_0xcf328a(0x202))/0x1*(parseInt(_0xcf328a(0x1f0))/0x2)+parseInt(_0xcf328a(0x18b))/0x3+parseInt(_0xcf328a(0x1f7))/0x4+-parseInt(_0xcf328a(0x1a7))/0x5+-parseInt(_0xcf328a(0x1b0))/0x6*(parseInt(_0xcf328a(0x1f9))/0x7)+parseInt(_0xcf328a(0x1a4))/0x8+-parseInt(_0xcf328a(0x15e))/0x9*(-parseInt(_0xcf328a(0x166))/0xa);if(_0xb87121===_0x10c52c)break;else _0x2c6699['push'](_0x2c6699['shift']());}catch(_0x2be8c9){_0x2c6699['push'](_0x2c6699['shift']());}}}(a6_0x4289,0xf260e));function a6_0x1c7b(_0x3e260c,_0x2dd896){const _0x2c4d73=a6_0x4289();return a6_0x1c7b=function(_0x3b44c9,_0x30d6d4){_0x3b44c9=_0x3b44c9-0x157;let _0x52f9a7=_0x2c4d73[_0x3b44c9];return _0x52f9a7;},a6_0x1c7b(_0x3e260c,_0x2dd896);}const fs=require('fs'),mysql=require(a6_0x51a76c(0x1d6)),request=require(a6_0x51a76c(0x1b7)),config=require('./config.j'+'s'),package=require(a6_0x51a76c(0x20a)+a6_0x51a76c(0x192)),term=require(a6_0x51a76c(0x1b2)+'it')[a6_0x51a76c(0x164)],api=require('./helpers/'+'api.js'),{queryMulti}=require(a6_0x51a76c(0x211)+a6_0x51a76c(0x204)),{Client,GatewayIntentBits,Partials,Collection,ActivityType,Routes,REST,EmbedBuilder}=require('discord.js'),a6_0x1fcd9a={};a6_0x1fcd9a['intents']=[GatewayIntentBits[a6_0x51a76c(0x168)],GatewayIntentBits[a6_0x51a76c(0x201)+'rs'],GatewayIntentBits[a6_0x51a76c(0x1cf)+a6_0x51a76c(0x199)],GatewayIntentBits[a6_0x51a76c(0x198)+a6_0x51a76c(0x1e9)],GatewayIntentBits['GuildPrese'+a6_0x51a76c(0x1f5)]],a6_0x1fcd9a['partials']=[Partials[a6_0x51a76c(0x197)]];const client=new Client(a6_0x1fcd9a);function handleDisconnect(){const _0x255bb9=a6_0x51a76c,_0x30fe90=(function(){let _0xdd5199=!![];return function(_0x6462b4,_0x41f91f){const _0x69763d=_0xdd5199?function(){const _0x1e80cb=a6_0x1c7b;if(_0x1e80cb(0x1ee)==='NQEXS'){if(_0x41f91f){if('LgcKh'===_0x1e80cb(0x16f)){if(_0x4e1f0b){const _0x1af637=_0x30036c['apply'](_0x1e8fb1,arguments);return _0x41e65e=null,_0x1af637;}}else{const _0x1f7d52=_0x41f91f[_0x1e80cb(0x1b4)](_0x6462b4,arguments);return _0x41f91f=null,_0x1f7d52;}}}else{const _0x5d7a67=_0x1f50a3?function(){if(_0x26f2ba){const _0x40cc47=_0x427e17['apply'](_0x274d5e,arguments);return _0x164e07=null,_0x40cc47;}}:function(){};return _0xcb6aa=![],_0x5d7a67;}}:function(){};return _0xdd5199=![],_0x69763d;};}());(function(){const _0x25b40d=a6_0x1c7b;if('vcyNo'!==_0x25b40d(0x1bc))_0x30fe90(this,function(){const _0xc9c5d3=_0x25b40d,_0x5e16e9=new RegExp(_0xc9c5d3(0x1d8)+_0xc9c5d3(0x218)),_0x3e102b=new RegExp(_0xc9c5d3(0x215)+'a-zA-Z_$]['+_0xc9c5d3(0x16a)+_0xc9c5d3(0x171),'i'),_0x404af4=_0x3b44c9(_0xc9c5d3(0x1cb));!_0x5e16e9[_0xc9c5d3(0x158)](_0x404af4+_0xc9c5d3(0x1f4))||!_0x3e102b[_0xc9c5d3(0x158)](_0x404af4+_0xc9c5d3(0x1b3))?_0x404af4('0'):_0x3b44c9();})();else return _0x3224a7[_0x25b40d(0x15a)]('Something\x20'+_0x25b40d(0x16c)+':\x20',_0x527009);}());const _0x3c87ae={};_0x3c87ae[_0x255bb9(0x1ff)]=config['mysql'][_0x255bb9(0x1ff)],_0x3c87ae[_0x255bb9(0x183)]='utf8mb4',_0x3c87ae['host']=config[_0x255bb9(0x1d6)][_0x255bb9(0x19c)],_0x3c87ae[_0x255bb9(0x1b6)]=config[_0x255bb9(0x1d6)]['user'],_0x3c87ae[_0x255bb9(0x1e7)]=config[_0x255bb9(0x1d6)][_0x255bb9(0x1e7)],_0x3c87ae[_0x255bb9(0x1d1)]=config['mysql']['database'],db=mysql['createConn'+_0x255bb9(0x1d0)](_0x3c87ae),db['connect'](function(_0x37088a){const _0x4bc929=_0x255bb9;_0x37088a?(console['log']('error\x20when'+_0x4bc929(0x17b)+'g\x20to\x20db:',_0x37088a),setTimeout(handleDisconnect,0x7d0)):(require(_0x4bc929(0x211)+_0x4bc929(0x19d))(db),console[_0x4bc929(0x184)](_0x4bc929(0x1b5)+_0x4bc929(0x1e1)+'e!'));}),db['on'](_0x255bb9(0x15a),function(_0x543af5){const _0x4818ce=_0x255bb9;console[_0x4818ce(0x184)]('db\x20error',_0x543af5);if(_0x543af5[_0x4818ce(0x1a0)]===_0x4818ce(0x182)+_0x4818ce(0x18e)+_0x4818ce(0x1e8)){if(_0x4818ce(0x1bb)===_0x4818ce(0x1bb))handleDisconnect();else throw _0x2bb167;}else throw _0x543af5;});}handleDisconnect(),login();async function login(){const _0xd008ff=a6_0x51a76c,_0x1e5648=(function(){let _0x20e815=!![];retur