Discord.js Changing Nickname and avatar continuously

Viewed 182

I want to change my bot's nickname which do not need to put in some thing like client.on("ready" or "message"

So far I've tried:

  • client.user.setNickname()
  • client.setNickname()

I've seen someone having a bot which changes its avatar and nickname continuously and I have no idea about their algorithm. (When I click the bot to view its profile it didn’t display anything)

If you want to have a look at the bot: https://discord.gg/pz8S2hrRnf #server-bridge

1 Answers

You cannot set the nickname on the user property, but you can on a GuildMember.

As @Zsolt Meszaros said, you would have to use <Guild>.me.setNickname()

See more details at the docs here.

Related