My aim was to reflect the player status, but the status does not appear normally, nor does the status appear in any way.
client.once('ready', () => {
console.log(`Bot Durumu Aktif!`);
setInterval(updateStatusFromLink, 1 * 60 * 1000);
});
async function updateStatusFromLink() {
try {
const response = await axios.get(link);
const html = response.data;
const $ = cheerio.load(html);
const targetSpan = $(targetDivSelector);
const playerStatus = targetSpan.text();
// Botun durumunu güncelle
client.user.setActivity(playerStatus, { type: 'PLAYING' });
console.log('Oyuncu Durumu:', playerStatus);
} catch (error) {
console.error('Veriyi alma hatası:', error.message);
}
}