title: how to automatically delete channels with a discord bot
body: <p>I'm doing a python bot for discord. it create an delete channel according to player instructions. 
  I want to create a garbage collector that test all the server.channels and delete the outdated one. </p>
  
  <p>I do : </p>
  
  <pre><code>async def waitTimer():
      while True:
          await asyncio.sleep(10)
  
          regex = re.compile(r"[0-9]*_[a-z0-9]*-[0-9]*") #nom des channels de raid
  
          for cCurrent in client.get_all_channels():
              if regex.match(cCurrent.name):
                  numRaid = int(cCurrent.name[0])
                  cRaidCurrent = cRaids[numRaid]
                  date = datetime.datetime.now()
                  print (cRaidCurrent.raid.fin.timestamp())
                  print (date.timestamp())
                  if cRaidCurrent.raid.fin &lt; date:
                      if cRaidCurrent.retirerRaid():
                          cId = cRaidCurrent.com.id
                          await removeFromListe(cRaidCurrent)
                          await client.delete_channel(client.get_channel(cId))
                          cCurrent = 0
  </code></pre>
  
  <p>Sometimes it pass and sometimes I get this error : </p>
  
  <pre><code>    for cCurrent in client.get_all_channels():
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/discord/client.py", line 581,
   in get_all_channels
      for channel in server.channels:
  RuntimeError: dictionary changed size during iteration
  </code></pre>
  
  <p>If I understand it clearly the <code>client.get_all_channels</code> is a dictionary and I can't remove the channels during the iteration ... So the question is what other possibilities do I have to remove those channel ? </p>