mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Add safesearch to .img when using google
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
using Google;
|
using Google;
|
||||||
using Google.Apis.Customsearch.v1;
|
using Google.Apis.Customsearch.v1;
|
||||||
using Google.Apis.Services;
|
using Google.Apis.Services;
|
||||||
using Google.Apis.Urlshortener.v1;
|
using Google.Apis.Urlshortener.v1;
|
||||||
@@ -220,6 +220,7 @@ namespace NadekoBot.Services
|
|||||||
req.Fields = "items(image(contextLink,thumbnailLink),link)";
|
req.Fields = "items(image(contextLink,thumbnailLink),link)";
|
||||||
req.SearchType = CseResource.ListRequest.SearchTypeEnum.Image;
|
req.SearchType = CseResource.ListRequest.SearchTypeEnum.Image;
|
||||||
req.Start = new NadekoRandom().Next(0, 20);
|
req.Start = new NadekoRandom().Next(0, 20);
|
||||||
|
req.Safe = CseResource.ListRequest.SafeEnum.Active;
|
||||||
|
|
||||||
var search = await req.ExecuteAsync().ConfigureAwait(false);
|
var search = await req.ExecuteAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user