def get_message_type(message):
    """Get the type of the message that was send to jstipBot"""
    if 'text' not in message:
        return 'NO_TEXT'
    elif 'entities' not in message:
        return 'NO_COMMAND'
    else:
        for entity in message['entities']:
            if entity['type'] == 'bot_command':
                return 'COMMAND'
        else:
            return 'NO_COMMAND'