code: async def on_raw_nick(self, message):
          
          nick, metadata = self._parse_user(message.source)
          new = message.params[0]
  
          self._sync_user(nick, metadata)
          # Acknowledgement of nickname change: set it internally, too.
          # Alternatively, we were force nick-changed. Nothing much we can do about it.
          if self.is_same_nick(self.nickname, nick):
              self.nickname = new
  
          # Go through all user lists and replace.
          self._rename_user(nick, new)
  
          # Call handler.
          await self.on_nick_change(nick, new)
docs: NICK command.