⭐🚀 TkyNET | Blacklist ve Profesyonel DDoS Korumalı TeamSpeak 3 Sunucuları 🚀⭐
Sponsor Görsel
Server ip : 95.173.173.2 || Ts3 : LCAPRO www.lcapro.net
Sponsor Görsel 2
SponsorSponsor

minecraft sunucu istatistik

Konu

#1
Kod Adı: minecraft sunucu istatistik
Kod Ne işe yarıyor: minecraft sunucu bilgilerini görmeye yarar
Gerekli Modüller: request
Kod:


Bot.js - Server.js içine atılacaktır

PHP Kod:
client.on("message"async message => {
   const args message.content.slice("!").trim().split(/ +/g);
if (
message.content.toLowerCase().startsWith(`!mc`)) {

  if(!args[1]){
    message.channel.send("Sunucu ipsi yazmalısın!")
  }
if(
args[1]){
      var url 'https://mcapi.xdefcon.com/server/' args[1] + '/full/json'

        request(url, function (errresponsebody) {
            if (err) {
                console.log(err);
              const embed1 = new Discord.RicEmbed()
              .setTitle("Hata!")
              .setDescription(`Sunucu bilgilerini alırken hata oluştu!`)
              .setColor("RED")
              .setTimestamp()
              .setFooter("Tarih");
              return message.channel.send(embed1)
            }
            body JSON.parse(body);
       
          
if(body.serverStatus == "offline"){
            const embed2 = new Discord.RichEmbed()
            .setColor("RED")
            .setAuthor("Hata!")
            .setDescription(`Bu sunucu aktif değil veya ip yanlış girdin!`)
            .setTimestamp()
            .setFooter("Tarih");
            message.channel.send(embed2)
          }
       
if(body.serverStatus == "online"){
  const embed = new Discord.RichEmbed()
  .setColor("RANDOM")
  .setAuthor(`Minecraft Sunucu Bilgileri`)
  .addField(`:rocket: İp Adresi`, "" body.serveriptrue)
  .addField(`:satellite: Port`, "25565",false)
  .addField(`:alarm_clock: Ping`, body.ping,false)
  .addField(`:dolls: Oyuncu Sayısı`, body.players "/" body.maxplayers,true)
  .setImage(`http://status.mclive.eu/Sunucu%20Durumu/${body.serverip}/25565/banner.png`)
  .setTimestamp()
  .setFooter("Tarih");
  message.channel.send(embed)

}

        });
}
}
}); 
Cevapla
#2
Teşekkürler
Cevapla
#3
Teşekkürler
Linksta
Cevapla
#4
Teşekkürler
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Task