'ReferenceError: websiteCheck is not defined discord.js
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()
});
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | FishyMine |
