title: How do I make an event listener with decorators in Python?
body: <p>I want to make an event listener
  like this:</p>
  <pre class="lang-py prettyprint-override"><code>@some.event
  async def on_ready(some_info):
      print(some_info)
  
  @some.event
  async def on_error(err):
      print(err)
  </code></pre>
  <p>So for when something is ready, or if a message is received in like WebSockets, using this for Discord since some info is only available for when the Bot is Identified or Ready</p>
  <p>I've seen something like:</p>
  <pre class="lang-py prettyprint-override"><code>def add_listener(func, name):
     # ...
  
  def remove_listener(func, name):
     # ...
  </code></pre>
  <p>But I don't really know how to use it or create one</p>