def parse_punishment(argument):
    """Converts a punishment name to its code"""
    punishments = {
        "none": 0,
        "note": 1,
        "warn": 1,
        "mute": 2,
        "kick": 3,
        "ban": 4
    }
    return punishments[argument.lower()]