remove something specific from someones nickname
i want to make a bot where if someone has a nickname for example kermit - kelp it removes the - kelp and only keeps kermit, how do i do this? i tried before ( im an amateur; started like a 3 weeks ago) and i just kept getting errors
7 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!:event: (event) Client#guildMemberUpdate
@14.15.2
Emitted whenever a guild member changes - i.e. new role, removed role, nickname.
:method: GuildMember#setNickname @14.15.2
Sets the nickname for this member.
listen to that event, check its nickname and change if needed ^^
the nickname is already there i just want it to go through the members of the discord, find the people with - kelp in their nickname and remove it
is that possible?
:property: Guild#members
@14.15.2
A manager of the members belonging to this guild
:method: GuildMemberManager#fetch @14.15.2
Fetches member(s) from a guild.
just iterate there
alright thanks