~boobs ~i and ~ir implemented :D
This commit is contained in:
parent
3244c3d6ba
commit
4e66f7eac0
@ -84,21 +84,33 @@ namespace NadekoBot.Modules {
|
||||
});
|
||||
|
||||
cgb.CreateCommand("~i")
|
||||
.Description("Pulls a first image using a search parameter.\n**Usage**: @NadekoBot img Multiword_search_parameter")
|
||||
.Alias("img")
|
||||
.Parameter("all", ParameterType.Unparsed)
|
||||
.Description("Pulls a first image using a search parameter. Use ~ir for different results.\n**Usage**: ~i cute kitten")
|
||||
.Parameter("query", ParameterType.Unparsed)
|
||||
.Do(async e => {
|
||||
await e.Send("This feature is being reconstructed.");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(e.GetArg("query")))
|
||||
return;
|
||||
try {
|
||||
var reqString = $"https://www.googleapis.com/customsearch/v1?q={Uri.EscapeDataString(e.GetArg("query"))}&cx=018084019232060951019%3Ahs5piey28-e&num=1&searchType=image&fields=items%2Flink&key={NadekoBot.creds.GoogleAPIKey}";
|
||||
var obj = JObject.Parse(await GetResponseAsync(reqString));
|
||||
await e.Send(obj["items"][0]["link"].ToString());
|
||||
} catch (Exception ex) {
|
||||
await e.Send($":anger: {ex.Message}");
|
||||
}
|
||||
});
|
||||
|
||||
cgb.CreateCommand("~ir")
|
||||
.Description("Pulls a random image using a search parameter.\n**Usage**: @NadekoBot img Multiword_search_parameter")
|
||||
.Alias("imgrandom")
|
||||
.Parameter("all", ParameterType.Unparsed)
|
||||
.Description("Pulls a random image using a search parameter.\n**Usage**: ~ir cute kitten")
|
||||
.Parameter("query", ParameterType.Unparsed)
|
||||
.Do(async e => {
|
||||
await e.Send("This feature is being reconstructed.");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(e.GetArg("query")))
|
||||
return;
|
||||
try {
|
||||
var reqString = $"https://www.googleapis.com/customsearch/v1?q={Uri.EscapeDataString(e.GetArg("query"))}&cx=018084019232060951019%3Ahs5piey28-e&num=1&searchType=image&start={ _r.Next(1, 150) }&fields=items%2Flink&key={NadekoBot.creds.GoogleAPIKey}";
|
||||
var obj = JObject.Parse(await GetResponseAsync(reqString));
|
||||
await e.Send(obj["items"][0]["link"].ToString());
|
||||
} catch (Exception ex) {
|
||||
await e.Send($":anger: {ex.Message}");
|
||||
}
|
||||
});
|
||||
|
||||
cgb.CreateCommand("~hentai")
|
||||
@ -135,6 +147,16 @@ namespace NadekoBot.Modules {
|
||||
.Do(async e => {
|
||||
await e.Send("http://i.imgur.com/MZkY1md.jpg");
|
||||
});
|
||||
cgb.CreateCommand("~boobs")
|
||||
.Description("Real adult content.")
|
||||
.Do(async e => {
|
||||
try {
|
||||
var obj = JArray.Parse(await GetResponseAsync($"http://api.oboobs.ru/boobs/{_r.Next(0, 9304)}"))[0];
|
||||
await e.Send($"http://media.oboobs.ru/{ obj["preview"].ToString() }");
|
||||
} catch (Exception ex) {
|
||||
await e.Send($":anger: {ex.Message}");
|
||||
}
|
||||
});
|
||||
cgb.CreateCommand("lmgtfy")
|
||||
.Alias("~lmgtfy")
|
||||
.Description("Google something for an idiot.")
|
||||
|
Loading…
Reference in New Issue
Block a user