title: Discord.py on_member_join and on_member_leave not working
body: <p>I started using <code>discord.py</code> (not <code>discord.ext</code> commands, only <code>import discord</code>). Recently, I made a channel, the name of which shows the member count in the guild, and it updates everytime someone joins or leaves. This is my code:</p>
  <pre class="lang-py prettyprint-override"><code>import discord
  
  client = discord.Client()
  
  @client.event
  async def on_ready():
      print(&quot;Bot is ready&quot;)
  
  @client.event
  async def on_member_join(member):
      channel = client.get_channel('channel id here')
      await channel.edit(name = 'Member count: {}'.format(channel.guild.member_count()))
      
  @client.event
  async def on_member_leave(member):
      channel = client.get_channel('channel id here')
      await channel.edit(name = 'Member count: {}'.format(channel.guild.member_count()))
  
  client.run('my token here')
  </code></pre>
  <p>I also added <code>client.on_message</code> command so the bot would edit that name to whatever I typed in.</p>
  <pre class="lang-py prettyprint-override"><code>@client.event
  async def on_message(message)
       if message.content == 'rename channel':
              channel = client.get_channel('channel id here')
              await channel.edit(name = 'TEST')
  </code></pre>
  <p>Now, after adding some print's for debugging, I found out that <code>on_member_join()</code> and <code>on_member_leave()</code> never get called, but the bot edits the channel's name when I type the command. That's a voice channel, which shows member count. There aren't any errors. Did I read the API wrong? Please help</p>