My bot doesnt displaying status, sending numbers instead of @mention, TypeError: client.channels.find is not a function, TypeError: message.member.roles.find is not a function

My bot randomly broken today.
Everything was fine and POOF.
Bo was unable to login for 4 hours.
After this whole code stopped working.

TypeError: message.member.roles.find is not a function

TypeError: client.channels.find is not a function

When bot sending @mention its just random numbers.

client.user.setPresence({ status: ‘online’, game: { name: settings.bot_status }}) doesnt do anything.

Please help!
My bot was working!
I tried to reinstall all npm packages but nothing change.
I cant find any help in internet.

What is the version for Discord.js?

In Discord.js v12
message.member.roles.find is message.member.roles.cache.find
client.channels.find is client.channels.cache.find

Go here to see the changes for Discord.js v12 - https://discordjs.guide/additional-info/changes-in-v12.html

1 Like