#How to change bot nickname on a server

17 messages · Page 1 of 1 (latest)

molten ruin
#
client.guilds.cache.forEach((guild) => {
            guild.me.setNickname('nickname');
        });

i get this error: Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'setNickname')

dusty remnant
#

• 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.

sick vine
#

This is API spam

molten ruin
#

oh looping over every guild?

sick vine
#

You are looping over guilds, attempting to set the nickname
This is too many requests in a short time

molten ruin
sick vine
#

why don't you just do it manually then Thonk

#

Sure 2 servers is fine, but I'm curious

molten ruin
#

but im using discord.js

sick vine
#

It makes no sense but ok

molten ruin
#

not sure how to do it

molten ruin
sick vine
#

it's guild**.members**.me

molten ruin
#

it doesnt seems to be a rate limit