title: How to automatically toggle a command off - discord.py
body: <p>I'm currently working on a discord.py raid-detection system, which contains this block of code:</p>
  <pre><code>raid_protection = 'Offline'
  @bot.command()
  async def raid_mod_on(ctx):
      global raid_protection
  
      raid_protection = 'Online'
      print('Raid moderation systems online')
      return raid_protection
  </code></pre>
  <p>I also have:</p>
  <pre><code>@bot.command()
  async def raid_mod_off(ctx):
  
      raid_protection = 'Offline'
      print('Raid moderation systems offline.')
      return raid_protection
  </code></pre>
  <p>Now, I want the <code>raid_mod_on</code> command to trigger on once activated (either when called by the on_member_join event, or when called using the prefix by a user) to toggle on (return raid_protection = 'Online') and stay like that for a certain duration (for the sake of example, let's say 24 hours) before toggling back off (return raid_protection = 'Offline') automatically without any intervention.</p>
  <p>I've tried things like <code>await asyncio.sleep(86400)</code>, but that tends to block out any async code following the call; I've also tried <code>time.sleep(86400)</code>, but that tends to also block my ordinary - synchronous code following the call.</p>
  <p>I would like a method which is easy to implement, doesn't block any code following the function call; and most importantly: works.</p>
  <p>All help will be greatly appreciated :)</p>
  <p>Please do mind that I am new to Python, so showing code along with helpful suggestions is preferable for me; since I'm still learning.</p>
  <p>Thanks for your time.</p>