title: discord.py call @client.command() from @client.event
body: <p>I have a function which is <code>@client.command()</code>:</p>
  <pre><code>@client.command()
  async def warn(ctx, member: discord.Member, *, reason=None):
      add_warning_points(member)
      await ctx.send(f'Warned {member.mention} for {reason}')
  </code></pre>
  <p>Now, I want to call it from <code>on_message()</code>:</p>
  <pre><code>@client.event
  @commands.has_permissions(manage_messages=True)
  async def on_message(message):
      for word in fwords:
          if word in message.content.lower():
              print(&quot;WARNING: Filtered word&quot;)
              await warn() # I want to call warn() here
      await client.process_commands(message)
  </code></pre>
  <p>However, i can't call <code>warn()</code> in that way because it requires <code>ctx</code> but <code>ctx</code> doesn't exist in <code>@client.event</code> function</p>
  <p>Any help is highly appreciated! Thanks!</p>