explicit on danboru gelboruu if used from ~hentai

This commit is contained in:
Master Kwoth 2016-03-15 00:35:25 +01:00
parent 5593664df5
commit 4045cc9308
3 changed files with 8 additions and 10 deletions

View File

@ -4,8 +4,6 @@ using System.Threading.Tasks;
using Discord; using Discord;
using Discord.Commands; using Discord.Commands;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq.Expressions;
using NadekoBot.Classes.JSONModels; using NadekoBot.Classes.JSONModels;
namespace NadekoBot.Classes.Permissions { namespace NadekoBot.Classes.Permissions {
@ -16,7 +14,7 @@ namespace NadekoBot.Classes.Permissions {
private ConcurrentDictionary<User, DateTime> timeBlackList { get; } = new ConcurrentDictionary<User, DateTime>(); private ConcurrentDictionary<User, DateTime> timeBlackList { get; } = new ConcurrentDictionary<User, DateTime>();
static PermissionChecker() { } static PermissionChecker() { }
public PermissionChecker() { private PermissionChecker() {
Task.Run(async () => { Task.Run(async () => {
while (true) { while (true) {
//blacklist is cleared every 1.75 seconds. That is the most time anyone will be blocked //blacklist is cleared every 1.75 seconds. That is the most time anyone will be blocked

View File

@ -173,9 +173,9 @@ namespace NadekoBot.Commands {
var msg = $"Stream is currently **{(data.Item1 ? "ONLINE" : "OFFLINE")}** with **{data.Item2}** viewers"; var msg = $"Stream is currently **{(data.Item1 ? "ONLINE" : "OFFLINE")}** with **{data.Item2}** viewers";
if (data.Item1) if (data.Item1)
if (type == StreamNotificationConfig.StreamType.Hitbox) if (type == StreamNotificationConfig.StreamType.Hitbox)
msg += $"\n`Here is the Link:` http://www.hitbox.tv/{stream.Username}"; msg += $"\n`Here is the Link:` http://www.hitbox.tv/{stream.Username}";
else if (type == StreamNotificationConfig.StreamType.Twitch) else if (type == StreamNotificationConfig.StreamType.Twitch)
msg += $"\n`Here is the Link:` http://www.twitch.tv/{stream.Username}"; msg += $"\n`Here is the Link:` http://www.twitch.tv/{stream.Username}";
else if (type == StreamNotificationConfig.StreamType.YoutubeGaming) else if (type == StreamNotificationConfig.StreamType.YoutubeGaming)
msg += $"\n`Here is the Link:` not implemented yet - {stream.Username}"; msg += $"\n`Here is the Link:` not implemented yet - {stream.Username}";
stream.LastStatus = data.Item1; stream.LastStatus = data.Item1;

View File

@ -21,8 +21,8 @@ namespace NadekoBot.Modules {
.Parameter("tag", ParameterType.Unparsed) .Parameter("tag", ParameterType.Unparsed)
.Do(async e => { .Do(async e => {
var tag = e.GetArg("tag")?.Trim() ?? ""; var tag = e.GetArg("tag")?.Trim() ?? "";
await e.Channel.SendMessage(":heart: Gelbooru: " + await SearchHelper.GetGelbooruImageLink(tag)); await e.Channel.SendMessage(":heart: Gelbooru: " + await SearchHelper.GetGelbooruImageLink("rating%3Aexplicit+"+tag));
await e.Channel.SendMessage(":heart: Danbooru: " + await SearchHelper.GetDanbooruImageLink(tag)); await e.Channel.SendMessage(":heart: Danbooru: " + await SearchHelper.GetDanbooruImageLink("rating%3Aexplicit+"+tag));
}); });
cgb.CreateCommand(Prefix + "danbooru") cgb.CreateCommand(Prefix + "danbooru")
.Description("Shows a random hentai image from danbooru with a given tag. Tag is optional but preffered. (multiple tags are appended with +)\n**Usage**: ~danbooru yuri+kissing") .Description("Shows a random hentai image from danbooru with a given tag. Tag is optional but preffered. (multiple tags are appended with +)\n**Usage**: ~danbooru yuri+kissing")