Discord.JS TypeError: Cannot read properties of undefined (reading ‘get’)

I fixed it! It seems that the order in which Discord and client were (in here).

module.exports = (Discord, client, msg)

was wrong! Instead, I swapped Discord around with client and it seems to work!

module.exports = (client, Discord, msg)

If anyone can tell me why this happens (as I would love to learn more) You can comment or answer!

There was also an error with the execute command which I also fixed

if(cmd) {
        cmd.execute(client, msg, args, Discord);
}

Thanks everyone for their contribution! Really needed your help!

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top