title: Discord.py: Want to have message.content read as lowercase, .lower() not working
body: <pre><code>import discord
  import asyncio
  import sys
  from discord.ext import commands
  client=commands.Bot(command_prefix = '.')
  id=client.get_guild(-----)
  codeword=[&quot;codeword&quot;]
  
  @client.event
  async def on_message(message):
      message.content=message.content.lower()
      if message.content== 'sys.exit()': sys.exit()
      if  message.content in codeword:
          await message.channel.send(&quot;{}&quot;.format(message.author.display_name))
          await message.delete()
  client.run('------')
  </code></pre>
  <p>Expected outcome: codeword, regardless of capitalization is removed.</p>
  <p>Error: NameError: name 'lower' is not defined</p>
  <p>I also tried</p>
  <pre><code>@client.event
  async def on_message(message):
      if message.content.lower()== 'sys.exit()': sys.exit()
      if  message.content.lower() in codeword:
          await message.channel.send(&quot;{}.format(message.author.display_name))
          await message.delete()
  </code></pre>
  <p>Error:'str' object has no attribute 'lowercase'</p>