From c58ae9fc13854bd60f32521aa65a0d660f73fc28 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 10 Jan 2022 13:32:18 +0100 Subject: [PATCH] Added safesearch to .img when using google (thx to ZeroNyan) --- src/NadekoBot/Services/Impl/GoogleApiService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NadekoBot/Services/Impl/GoogleApiService.cs b/src/NadekoBot/Services/Impl/GoogleApiService.cs index c5f9a4c43..fb1ea9445 100644 --- a/src/NadekoBot/Services/Impl/GoogleApiService.cs +++ b/src/NadekoBot/Services/Impl/GoogleApiService.cs @@ -341,6 +341,7 @@ public class GoogleApiService : IGoogleApiService, INService req.Fields = "items(image(contextLink,thumbnailLink),link)"; req.SearchType = CseResource.ListRequest.SearchTypeEnum.Image; req.Start = new NadekoRandom().Next(0, 20); + req.Safe = CseResource.ListRequest.SafeEnum.Active; var search = await req.ExecuteAsync();