So I was basically coding a discord.js v12 bot and NodeJS keeps giving me this error even though websiteCheck is defined. If you can help thank you so much <3
function websiteCheck() {
// im not showing code because it will advertise a website.
};
const scheduledCheck = schedule.scheduleJob('*/1 * * * *', function(){
console.log('Checking Status of site');
websiteCheck()
});
So basically function
wasnt being read somehow in the script, it started working with const websiteCheck = async function(){
. Now its defined and everything is normal.
I don't know why function
wasn't being read but oh well.