def get_service_dicts_for_bot(user_profile_id: int) -> List[Dict[(str, Any)]]:
    user_profile = get_user_profile_by_id(user_profile_id)
    services = get_bot_services(user_profile_id)
    service_dicts: List[Dict[(str, Any)]] = []
    if (user_profile.bot_type == UserProfile.OUTGOING_WEBHOOK_BOT):
        service_dicts = [{'base_url': service.base_url, 'interface': service.interface, 'token': service.token} for service in services]
    elif (user_profile.bot_type == UserProfile.EMBEDDED_BOT):
        try:
            service_dicts = [{'config_data': get_bot_config(user_profile), 'service_name': services[0].name}]
        except ConfigError:
            pass
    return service_dicts
def get_service_dicts_for_bot(user_profile_id: int) -> List[Dict[(str, Any)]]:
    user_profile = get_user_profile_by_id(user_profile_id)
    services = get_bot_services(user_profile_id)
    service_dicts: List[Dict[(str, Any)]] = []
    if (user_profile.bot_type == UserProfile.OUTGOING_WEBHOOK_BOT):
        service_dicts = [{'base_url': service.base_url, 'interface': service.interface, 'token': service.token} for service in services]
    elif (user_profile.bot_type == UserProfile.EMBEDDED_BOT):
        try:
            service_dicts = [{'config_data': get_bot_config(user_profile), 'service_name': services[0].name}]
        except ConfigError:
            pass
    return service_dicts