title: How to clear messages in a channel without someone typing in a command
body: <p>I want to make a bot that deletes everything in a channel every sunday, I have gotten the dates down but I don't understand how I can delete every message in a certain channel without someone running a command that tells the bot to delete everything, any way to do this?</p>
  <p>My code so far</p>
  <pre><code>    import discord
  from discord.ext import commands
  import random
  import datetime
  from datetime import date
  import calendar
  
  
  client = commands.Bot(command_prefix='.')
  
  has_cleaned_channel = 0
  date = datetime.date(2021,4,4)
  if date == date.today():
    if has_cleaned_channel == 0:
      print(&quot;Date is Sunday&quot;)
      print(date.today())
      has_cleaned_channel = 1
  
  date2 = datetime.date(2021,4,5)
  if date2 == date.today():
    has_cleaned_channel = 0
  
  
  client.run(&quot;TOKEN&quot;)
  </code></pre>