From 4045cc9308989ca42387b9d730bc65f6a8d78a47 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 15 Mar 2016 00:35:25 +0100 Subject: [PATCH] explicit on danboru gelboruu if used from ~hentai --- NadekoBot/Classes/Permissions/PermissionChecker.cs | 4 +--- NadekoBot/Commands/StreamNotifications.cs | 10 +++++----- NadekoBot/Modules/NSFW.cs | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/NadekoBot/Classes/Permissions/PermissionChecker.cs b/NadekoBot/Classes/Permissions/PermissionChecker.cs index b49e7ca0..df1bb67b 100644 --- a/NadekoBot/Classes/Permissions/PermissionChecker.cs +++ b/NadekoBot/Classes/Permissions/PermissionChecker.cs @@ -4,8 +4,6 @@ using System.Threading.Tasks; using Discord; using Discord.Commands; using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq.Expressions; using NadekoBot.Classes.JSONModels; namespace NadekoBot.Classes.Permissions { @@ -16,7 +14,7 @@ namespace NadekoBot.Classes.Permissions { private ConcurrentDictionary timeBlackList { get; } = new ConcurrentDictionary(); static PermissionChecker() { } - public PermissionChecker() { + private PermissionChecker() { Task.Run(async () => { while (true) { //blacklist is cleared every 1.75 seconds. That is the most time anyone will be blocked diff --git a/NadekoBot/Commands/StreamNotifications.cs b/NadekoBot/Commands/StreamNotifications.cs index ab7b89ff..853c3773 100644 --- a/NadekoBot/Commands/StreamNotifications.cs +++ b/NadekoBot/Commands/StreamNotifications.cs @@ -44,11 +44,11 @@ namespace NadekoBot.Commands { $"**{data.Item2}** viewers."; if (stream.LastStatus) if (stream.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 (stream.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 (stream.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} 】"; await channel.SendMessage(msg); } } @@ -173,9 +173,9 @@ namespace NadekoBot.Commands { var msg = $"Stream is currently **{(data.Item1 ? "ONLINE" : "OFFLINE")}** with **{data.Item2}** viewers"; if (data.Item1) 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) - 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) msg += $"\n`Here is the Link:` not implemented yet - {stream.Username}"; stream.LastStatus = data.Item1; diff --git a/NadekoBot/Modules/NSFW.cs b/NadekoBot/Modules/NSFW.cs index fc191afa..efbcf8d1 100644 --- a/NadekoBot/Modules/NSFW.cs +++ b/NadekoBot/Modules/NSFW.cs @@ -21,8 +21,8 @@ namespace NadekoBot.Modules { .Parameter("tag", ParameterType.Unparsed) .Do(async e => { var tag = e.GetArg("tag")?.Trim() ?? ""; - await e.Channel.SendMessage(":heart: Gelbooru: " + await SearchHelper.GetGelbooruImageLink(tag)); - await e.Channel.SendMessage(":heart: Danbooru: " + await SearchHelper.GetDanbooruImageLink(tag)); + await e.Channel.SendMessage(":heart: Gelbooru: " + await SearchHelper.GetGelbooruImageLink("rating%3Aexplicit+"+tag)); + await e.Channel.SendMessage(":heart: Danbooru: " + await SearchHelper.GetDanbooruImageLink("rating%3Aexplicit+"+tag)); }); 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")