Untitled

mail@pastecode.io avatar
unknown
javascript
2 years ago
1.6 kB
8
Indexable
Never
else if (input.startsWith("/mlbbinfo")){

                        let data = input.split(" ");

                         var id = data[1];
                         var zone = data[2];
                      const https = require('https');
                      const infs = require('got');
                     infs.get("https://zhenteam.000webhostapp.com/mlbbinfo.php?role="+id+"&key=ZhenTeam&zone="+zone)
                         .then(res=>{
                         var infoss = res.body;
                    var infoss = infoss.replace(/ /g,'');
                    var respons = JSON.parse(infoss);
                 response = respons.Information.Response,
                  ign = respons.Information.InGameName,
                   aydi = respons.Information.Role,
                    serv = respons.Information.Server,
                    rankstage = respons.Information.RankStage,
                    rankposition = respons.Information.RankPosition,
                        star = respons.Information.Stars,
                    result = "💠MLBB INFORMATION💠\n🈳 "+ign+"\n🆔 "+aydi+" "+serv+"\n📊 "+rankposition+" "+rankstage;
                         if (response === "Success"){
                        api.sendMessage(result, event.threadId);
                  }else{
                    api.sendMessage("❎Invalid ml id or server", event.threadID, event.messageID);
                       }
                      })
                         .catch(err=>{
                   console.log(err.message)
                    })
            }