Error fetching channel

*sry wrong title, should be setNicknames doesnt always update
let getguild = await client.guilds.cache.get("ID")
let userToAddRole = await getguild.members.fetch("ID")
userToAddRole.setNickname(`[WN] ${userToAddRole.user.username}`)
let getguild = await client.guilds.cache.get("ID")
let userToAddRole = await getguild.members.fetch("ID")
userToAddRole.setNickname(`[WN] ${userToAddRole.user.username}`)
this sometimes updates the nicknames, but sometimes doesnt. Any reasons why this would be the case?
4 Replies
d.js docs
d.js docs2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
monbrey
monbrey2y ago
Rate limiting is the only reason I can think of
Mulo
Mulo2y ago
what that'd be? once a sec?
monbrey
monbrey2y ago
No idea