title: Logging messages with discord.py bot
body: <p>I'm trying to add a logging feature to my bot</p>
  <p>I am trying to make the program output the text but it outputs the object reference instead</p>
  <pre class="lang-py prettyprint-override"><code>@bot.event
  async def on_message(message: str):
      ts = time.time()
      st = datetime.datetime.fromtimestamp(ts).strftime('%Y-%m-%d %H:%M:%S')
      with open(&quot;logs.txt&quot;, &quot;a&quot;) as text_file:
          print(f&quot;&lt;{st}&gt; {message}&quot;, file=text_file)
  </code></pre>
  <p>I was expecting something like this
  if the message was &quot;hello&quot; at 2019-06-08 17:32
  it would output</p>
  <pre><code>&lt;2019-06-08 17:32:26&gt; hello
  </code></pre>
  <p>but it just does</p>
  <pre><code>&lt;2019-06-08 17:24:26&gt; &lt;discord.message.Message object at 0x0083C0A8&gt;
  </code></pre>