Kod:
const { Gamedig } = require('gamedig')
client.on("ready", () => {
client.setInterval(durumKontrol, 60);
})
function durumKontrol() {
Gamedig.query({
type: 'counterstrike', //
host: "ip"
}).then((state) => {
client.user.setActivity(`${state.players.length} kişi aktif!`, {
type: 'PLAYING'
})
}).catch((error) => {
console.log("Bağlantı kurulurken bir hata oluştu!")
})
})

