Skip to content
Advertisement

error : Cannot read property ‘execute’ of undefined

hi I try to make a command handler for my discord bot but I always get an error when on discord I try my !ping command

Here’s my main.js file

JavaScript

And my ping.js File

JavaScript

The error i’m getting

JavaScript

Advertisement

Answer

Use module.exports, as the export property does not exist on module (export needs to be pluralised).

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement