#readdirSync error

4 messages · Page 1 of 1 (latest)

wary rock

in the second chunk of code my linter made me put path. and fs. in the ``` const commandsPath = path.join(foldersPath, folder);

spice shell

one of your command paths is a .js file

specifically commands/ping.js

pulsar shale

You should move the filter to the first readdirSync (and use => instead of =) and remove the entire first for loop which is unnecessary