node:fs:1508
const result = binding.readdir(
^
Error: ENOTDIR: not a directory, scandir 'C:\Users\jeanb\Desktop\Bot Discord\Code\commands\ping.js'
at Object.readdirSync (node:fs:1508:26)
at Object.<anonymous> (C:\Users\jeanb\Desktop\Bot Discord\Code\index.js:13:26)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49 {
errno: -4052,
code: 'ENOTDIR',
syscall: 'scandir',
path: 'C:\Users\jeanb\Desktop\Bot Discord\Code\commands\ping.js'
}
Node.js v20.12.0
Creating Your Bot: Command handling