TypeError: Cannot read property ‘name’ of undefined
at load (/home/runner/150-Commands-Bot-1/handler/command.js:8:42)
at /home/runner/150-Commands-Bot-1/handler/command.js:12:38
at Array.forEach ()
at module.exports (/home/runner/150-Commands-Bot-1/handler/command.js:12:25)
at /home/runner/150-Commands-Bot-1/index.js:16:71
at Array.forEach ()
at Object. (/home/runner/150-Commands-Bot-1/index.js:16:33)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
You clearly got that code from somewhere right? I assume they didn’t present it exactly like you have it written there. My guess is that you have mistakenly written pull.config.name rather than pull.name.
That being said I typically warn people away from this automated loading of .js files by folder convention. It can work but it doesn’t turn out to be any faster, clearer or easier to use as far as I can see.