async function counts() { schedule('* * 22 * * *', async () => { try { const theSavannah = { guildID: `1327823232354615317`, guildCountID: `1401738289232478309`, channelCountID: `1341596843754393670`, userCountID: `1341596868207185973`, }; // Set the guild count channel const guildCountId = client.channels.cache.find(ch => ch.id === theSavannah.guildCountID) // Set the guild count size const guildCount = client.guilds.cache.size; guildCountId.setName(`Total guilds : ${guildCount}`); } catch (e) { console.log(e) } }); } counts();