title: Add role to a user discord.py
body: <p>i want to add a role when a person join my discord so i don't know what don't working here.</p>
  <pre><code>@bot.event
  async def on_member_join(member):
      pseudo = member.mention
      print(member)
  
      print(&quot;New member connected&quot;)
      # Envoyer un message privé au nouveau membre
  
      await member.send(f&quot;Bienvenue sur CodeNet {pseudo} \n Fait la commande !!regles pour lire les règles ! \n Notre site web: http://codenet.ddns.net/&quot;)
      channel = bot.get_channel(771466599369539584)
      await channel.send(f&quot;Bienvenue {pseudo} sur CodeNet !!!&quot;)
      test = discord.utils.get(member.guild.roles, name=&quot;membre&quot;)
      await member.add_roles(member, test) 
  </code></pre>
  <p>Here the error</p>
  <pre><code>Ignoring exception in on_member_join
  Traceback (most recent call last):
    File &quot;C:\Users\Mick\AppData\Roaming\Python\Python37\site-packages\discord\client.py&quot;, line 333, in _run_event
      await coro(*args, **kwargs)
    File &quot;C:/Users/Mick/PycharmProjects/lexigreybot/main.py&quot;, line 31, in on_member_join
      await member.add_roles(member, test)
    File &quot;C:\Users\Mick\AppData\Roaming\Python\Python37\site-packages\discord\member.py&quot;, line 664, in add_roles
      await req(guild_id, user_id, role.id, reason=reason)
    File &quot;C:\Users\Mick\AppData\Roaming\Python\Python37\site-packages\discord\http.py&quot;, line 243, in request
      raise NotFound(r, data)
  discord.errors.NotFound: 404 Not Found (error code: 10011): Unknown Role
  </code></pre>