title: How to detect discord user streaming activity update (discord.py)
body: <p>I have this code to detect when someone's activity is set to streaming, but with the way that i have done it (i'm fairly sure there are better ways), i'm not sure how to detect when it it is no longer set to streaming and remove the role.</p>
  <pre class="lang-py prettyprint-override"><code>@client.event
  async def on_member_update(before, after):
      game = [i for i in after.activities if str(i.type) == &quot;ActivityType.streaming&quot;]
      if game:
        channel = client.get_channel(848003612121628682)
        guild = client.get_guild(762352010463936523)
        role = discord.utils.find(lambda r: r.name == 'Live!', guild.roles)
        await after.add_roles(role)
        await channel.send(&quot;&lt;@427155509129379851&gt; someone live&quot;)
        print(game[0].name)
        print(f'{after.name}')
  </code></pre>