title: Discord Bot, that gives role to a new members
body: <p>Bot is simply don`t work :/ The bot doesnt give any errors &amp; roles. I will be grateful for any help</p>
  <pre><code>import discord
  from discord.ext import commands
  from discord.utils import get
  
  client =  discord.Client()
  
  @client.event
  async def on_ready():
      print('Bot is ready')
  
  @client.event
  async def on_member_join(member):
      role = discord.utils.get(member.server.roles, id=&quot;role_id&quot;)
      await client.add_roles(member, role)
  
  client.run('TOKEN')
  </code></pre>