title: Discord.py on_message isnt a @bot.event?
body: <pre class="lang-py prettyprint-override"><code>import datetime
  import discord
  from discord import message, ActivityType
  from discord.ext import commands
  import asyncio
  
  intents = discord.Intents().all()
  bot = commands.Bot(command_prefix='.', intents=intents)
  guild = 'SwiftNetwork'
  time = datetime.date.today()
  badword = ['bw', 'bw1', 'bw2', 'bw3']
  
  
  @bot.event
  async def on_ready():
      print('Wir sind als {1} auf {0} eingeloggt Vers: {2}'.format(guild, bot.user.name, discord.__version__))
      channel = bot.get_channel(id=697572461629407305)
      await channel.send('Heute ist der {0}.{1}.{2}'.format(time.day, time.month, time.year))
      # await bot.channel.send('Beep Boop Beep, Roboter Angriff wird gestartet..')
      bot.loop.create_task(status_task())
  
  
  @bot.command()
  async def hello(ctx):
      await ctx.channel.send(f&quot;Hello! {ctx.author.mention}&quot;)
  
  
  @bot.command()
  async def ping(ctx):
      await ctx.channel.send(round(bot.latency * 1000))
  
  
  @bot.command()
  async def poll(ctx, message, *args):
      # print(len(args) + 1)
      emoji = '1️⃣'
      pollem = discord.Embed(title='', description=f'{message}')
      context = []
  
      reactionx = ['1️⃣', '2️⃣', '3️⃣', '4️⃣']
  
      if len(args) &gt;= 2:
  
          for r in range(0, len(args), 2):
              reaction = ['1️⃣', '2️⃣', '3️⃣', '4️⃣']
  
          for x in range(1, len(args), 2):
              context.append(args[x])
  
          for a in range(0, len(args), 2):
              pollem.add_field(name=' {1} {0}'.format(args[a], reaction[int(r / 2)]), value=context[int(a / 2)],
                               inline=False)
  
          ms = await ctx.channel.send(embed=pollem)
  
      else:
          await ctx.channel.send('Check Args')
  
  
  async def status_task():
      async def status_task():
          while True:
              await bot.change_presence(activity=discord.Game('Hello'), status=discord.Status.online)
              await asyncio.sleep(3)
              await bot.change_presence(activity=discord.Game('Moin'), status=discord.Status.online)
              await asyncio.sleep(3)
              await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name=&quot;a song&quot;), status=discord.Status.online)
              await asyncio.sleep(3)
  
  
  @bot.event
  async def on_message(ctx):
      if ctx.author.bot:
          return
      for word in ctx.content.split(' '):
          if word in badword:
              await ctx.delete()
  
  
  </code></pre>
  <p>The problem is in the last event.
  If I run it like this, the <code>ctx.delete()</code> will work but all the commands above won't.
  If I remove the <code>@bot.event</code>, the commands work, but the <code>ctx.delete()</code> won't.</p>
  <p>I'd like to say I'm sure it's cause of the <code>@bot.event</code>, but in <code>on_ready</code> I'm using it as well and it works fine.
  So right now I really don't see any issues in the code.</p>