title: Discord.py run 2 instances of a bot in a script
body: <p>I have a discord bot that needs to run in a while(True) loop, as well as still receive commands. The only way I think I can do this that works with my program would be to have 2 separate instances of the bot running. Like saying:</p>
  <pre><code>import discord
  import time
  import asyncio
  
  client = commands.Bot(command_prefix = '!');       
  client2= commands.Bot(command_prefix = '.');
  channel = client.get_channel(734106469343249954)
  
  @client.event
  async def on_ready():
      time.Sleep(5)
      while(True):
          await channel.send(&quot;Sent message&quot;)
  
  @client2.command()
  async def a(ctx):
      await ctx.send(&quot;Send&quot;)
  </code></pre>
  <p>and then at the bottom:</p>
  <pre><code>loop = asyncio.get_event_loop()
  loop.create_task(client.start('Token'))
  loop.create_task(client2.start('Token'))
  loop.run_forever()
  </code></pre>
  <p>I tried this, and it didn't work. What am I doing wrong? Is there a way to run 2 bots, or the same bot twice from one script?</p>
  <p>I need one of the instances to be in a while(True) loop.</p>
  <p>When I try this I get loop starting and am able to call the <code>.a</code> command until the loop starts, but afterwards, it gives me no response.</p>
  <p>How can I run 2 instances of a bot in a script, and keep one in a loop while letting the other one to listen to commands?</p>