I'm working on a simple dictionary accessible through a telegram bot. This is my code in Python, what am I wrong?
#!/usr/bin/python3
import telebot
API_TOKEN = 'MY TELEGRAM TOKEN'
bot = telebot.TeleBot(API_TOKEN)
Dizio={'cat': 'blue', 'dog': 'red', 'fly': 'black'}
# Handle all other messages with content_type 'text' (content_types defaults to ['text'])
@bot.message_handler(func=lambda message: True)
def echo_message(message):
if message.text.lower() in Dizio.keys():
res = Dizio.get('translate', {}).get('=')
bot.send_message(message.chat.id, message.text(res))
else:
bot.send_message(message.chat.id, 'not found')
bot.infinity_polling()