Nickname

Hello, please, can someone help me solve this problem? thanks!! :pikaLove: (function: i want to change bot nickaname on server automaticly after turn on bot)
No description
No description
1 Reply
Favna
Favna2y ago
change botMember to
const botMember = await guild.members.fetch(client.user.id);
const botMember = await guild.members.fetch(client.user.id);
the error means botMember is undefined so it's probably just not cached yet. If that doesn't solve it you'll have to dig some more yourself as to why botMember is undefined. That's on you to fix pretty much. Reference the DiscordJS documentation.
Want results from more Discord servers?
Add your server