def get_command(message):
    """Extract and returns the command from message"""
    text = message['text']

    for entity in message['entities']:
        if entity['type'] == 'bot_command':
            start = entity['offset'] + 1
            end = start + entity['length'] - 1

            return text[start:end]