title: how can i get joined user name and avatar url with discord.py?
body: <p>i want on member join bot create a welcome image with member avatar and name on it and send it to text channel but i couldn't find any way to get member name and avatar url (member.name or member.avatar_url doesn't works).
  here is my code:</p>
  <pre><code>#update status with new member count
  
  @client.event
  async def on_member_remove(member):
      member = 0
      for guild in client.guilds:
          member += guild.member_count - 1
      await client.change_presence(status=discord.Status.idle, activity = discord.Activity(
          type = discord.ActivityType.watching,
          name = f'{member} Members'
      ))
  
  #create a image with joined user avatar and username
      picture = Image.open(requests.get(member.avatar_url, stream=True).raw)
      text = &quot;Welcome, &quot; + member.name
  
      original_file_path = 'text.png'
      img = Image.open(&quot;default.png&quot;)
  
  
      draw = ImageDraw.Draw(img)
      font = ImageFont.truetype(&quot;arial.ttf&quot;, 72)
      draw.text((925,800), text, (255, 255, 255), font=font)
  
  
      back_im = picture.copy()
      back_im.paste(img, (925, 500))
  
  
      img.save(original_file_path)
  </code></pre>