def soft_get(data: dict, set_name: str, tp: type):
    """
    Get setting value from a dict, or set it by default,
    Use when setting *not* required.
    :param data: dict with data
    :param set_name: setting name
    :param tp: value type
    :return: setting value
    """
    def default(val):
        defaults = dict(
            api_sleep=0.07,
            end_datetime='now',
            start_datetime='-2M',
            max_post_length=1024,
            image_generation=True,
            images_chance=0.333,
        )
        print(f"{val.upper()} value is being set from defaults!\n"
              "There is no such value in settings.yml, or it's incorrect")
        return defaults[val]

    try:
        value = data[set_name]
        if type(value) != tp:
            value = default(set_name)
    except KeyError:
        value = default(set_name)
    return value