title: storing messages with a discord bot
body: <p>I'm trying to store messages with a discord bot, so that I can learn how the elements of messages vary between messages.</p>
  <p>However i am new to some aspects of this coding- i.e. decorators. Currently the piece of my bots code that interacts with messages is this:</p>
  <pre><code>messages=[]
  
  @bot.event
  async def on_message(message,messages):
      print(&quot;someone said something&quot;)
      messages=messages+message
      if message.author == bot.user:
          return messages
  </code></pre>
  <p>I think this is wrong. What I am trying to do is add a message to messages each time the event happens, so that I can later go through that variable and see how the different elements of messages change.</p>
  <p>How do i change the above to allow that?</p>