title: Discord ChatBot in python: How can I print something from a dictionary?
body: <p>I'm creating a ChatBot for Discord in python. I am creating a dictionary with questions and responses called responses. Whenever the user types in the question, it should give the appropriate response. But I got stuck and don't know how to print the response. The solution is probably pretty simple, but I feel like I'm missing something. Please help. Thanks in advance.</p>
  
  <pre><code>import discord
  from discord.ext.commands import Bot
  from discord.ext import commands
  import asyncio
  import time
  
  Client = discord.Client()
  client = commands.Bot(command_prefix = ":")
  
  responses = {
      "WHAT'S YOUR NAME?": "My name is ChatBot!"
  }
  
  @client.event
  async def on_ready() :
      print("I'm pretty much ready to talk...")
  
  @client.event
  async def on_message(message) :
      # When you say cookie, the bot responds with a cookie emoji
      if message.content.upper() == "COOKIE" :
          await client.send_message(message.channel, ":cookie:")
  
      # A simple question answerer
      if message.content.upper() in responses:
          await client.send_message(message.channel, responses[message])
  
  
  client.("Don't worry about my token")
  </code></pre>