so ive been trying to fix this problem for the past hour and can get it to work, its probably a stupid mistake, but what you see here is my fs.readdir is defined.
so ive been trying to fix this problem for the past hour and can get it to work, its probably a stupid mistake, but what you see here is my fs.readdir is defined.
You need to import fs. Put this above line 25 or your first use of fs
const fs = require('fs');
If you still don't install the fs package, go to terminal then type npm install fs
Ctrl + C if your bot is runningnpm install fs or npm i fsconst fs = require('fs');You can put it on line 13 in your js file