My discord bot's commands are not working

A few weeks ago my project expired and my project was closed.And downloaded my project to my device and transferred new project via github. Commands do not work in any way while things are working on bot.js.

This is the error I get when I type any command on Discord.Please help me thanks.

Check out the discordjs docs (discord.js.org) and search for GuildMember#hasPermission.
Is message.member the correct way to access this? What constructor does message.member return?

1 Like

Hmmm, the code does seem to be correct. You can access the hasPermission method from message.member!

1 Like

Odd - maybe the command is running against a null user? Try putting

if (!message.member.hasPermission) {
 console.log("no permission";
}

right above it.

Ok, this appears to be a DJS error? Refer to this stack overflow thread (1 month ago)

Alright, I seem to have isolated OPs error:

I do not know if this aligns fully, but it is a possibility.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.