From 497e25b19932b4e2027bb149ec6bad6621021138 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 12 Nov 2017 06:50:12 +0100 Subject: [PATCH 1/7] Removed leftover thing --- .../Modules/Searches/Services/SearchesService.cs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/NadekoBot.Core/Modules/Searches/Services/SearchesService.cs b/NadekoBot.Core/Modules/Searches/Services/SearchesService.cs index 2755cfb1..098364d9 100644 --- a/NadekoBot.Core/Modules/Searches/Services/SearchesService.cs +++ b/NadekoBot.Core/Modules/Searches/Services/SearchesService.cs @@ -132,22 +132,6 @@ namespace NadekoBot.Modules.Searches.Services return Task.CompletedTask; }; - if (client.ShardId == 0) - { - _t = new Timer(async _ => - { - var r = _cache.Redis.GetDatabase(); - try - { - - } - catch (Exception ex) - { - _log.Warn(ex); - } - }, null, TimeSpan.Zero, TimeSpan.FromHours(1)); - } - //joke commands if (File.Exists("data/wowjokes.json")) { From ee929c6dfc3edacc926c05e2788ab0b6edb2c9ee Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 12 Nov 2017 07:57:01 +0100 Subject: [PATCH 2/7] .novel fixed, close #1819 --- NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs | 4 ++-- .../Modules/Searches/Services/AnimeSearchService.cs | 2 ++ NadekoBot.Core/Modules/Searches/Services/SearchesService.cs | 1 - src/NadekoBot/_strings/ResponseStrings.en-US.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs b/NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs index fb1b0bd0..0fe17431 100644 --- a/NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs +++ b/NadekoBot.Core/Modules/Searches/AnimeSearchCommands.cs @@ -26,7 +26,7 @@ namespace NadekoBot.Modules.Searches if (novelData == null) { - await ReplyErrorLocalized("error_finding_novel").ConfigureAwait(false); + await ReplyErrorLocalized("failed_finding_novel").ConfigureAwait(false); return; } @@ -35,7 +35,7 @@ namespace NadekoBot.Modules.Searches .WithTitle(novelData.Title) .WithUrl(novelData.Link) .WithImageUrl(novelData.ImageUrl) - .AddField(efb => efb.WithName(GetText("authors")).WithValue(String.Join("\n", novelData.Authors)).WithIsInline(true)) + .AddField(efb => efb.WithName(GetText("authors")).WithValue(string.Join("\n", novelData.Authors)).WithIsInline(true)) .AddField(efb => efb.WithName(GetText("status")).WithValue(novelData.Status).WithIsInline(true)) .AddField(efb => efb.WithName(GetText("genres")).WithValue(string.Join(" ", novelData.Genres.Any() ? novelData.Genres : new[] { "none" })).WithIsInline(true)) .WithFooter(efb => efb.WithText(GetText("score") + " " + novelData.Score)); diff --git a/NadekoBot.Core/Modules/Searches/Services/AnimeSearchService.cs b/NadekoBot.Core/Modules/Searches/Services/AnimeSearchService.cs index e236fa51..daa5492c 100644 --- a/NadekoBot.Core/Modules/Searches/Services/AnimeSearchService.cs +++ b/NadekoBot.Core/Modules/Searches/Services/AnimeSearchService.cs @@ -67,6 +67,8 @@ namespace NadekoBot.Modules.Searches.Services var document = await BrowsingContext.New(config).OpenAsync(link); var imageElem = document.QuerySelector("div.seriesimg > img"); + if (imageElem == null) + return null; var imageUrl = ((IHtmlImageElement)imageElem).Source; var descElem = document.QuerySelector("div#editdescription > p"); diff --git a/NadekoBot.Core/Modules/Searches/Services/SearchesService.cs b/NadekoBot.Core/Modules/Searches/Services/SearchesService.cs index 098364d9..8656a038 100644 --- a/NadekoBot.Core/Modules/Searches/Services/SearchesService.cs +++ b/NadekoBot.Core/Modules/Searches/Services/SearchesService.cs @@ -51,7 +51,6 @@ namespace NadekoBot.Modules.Searches.Services public ConcurrentDictionary AutoButtTimers { get; } = new ConcurrentDictionary(); private readonly ConcurrentDictionary> _blacklistedTags = new ConcurrentDictionary>(); - private readonly Timer _t; private readonly SemaphoreSlim _cryptoLock = new SemaphoreSlim(1, 1); public async Task CryptoData() diff --git a/src/NadekoBot/_strings/ResponseStrings.en-US.json b/src/NadekoBot/_strings/ResponseStrings.en-US.json index 12b5ba93..dfabc637 100644 --- a/src/NadekoBot/_strings/ResponseStrings.en-US.json +++ b/src/NadekoBot/_strings/ResponseStrings.en-US.json @@ -923,5 +923,5 @@ "administration_invalid": "Invalid / Can't be found ({0})", "administration_mass_kill_in_progress": "Mass Banning and Blacklisting of {0} users is in progress...", "administration_mass_kill_completed": "Mass Banning and Blacklisting of {0} users is complete.", - "searches_error_finding_novel": "Can't find that novel. Make sure you've typed the exact full name, and that it exists on novelupdates.com" + "searches_failed_finding_novel": "Can't find that novel. Make sure you've typed the exact full name, and that it exists on novelupdates.com" } \ No newline at end of file From 35005b92b36eef6a28077ee148448cbf10528a93 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 12 Nov 2017 08:15:06 +0100 Subject: [PATCH 3/7] Maybe fixes #1811 --- NadekoBot.Core/Modules/Administration/LocalizationCommands.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NadekoBot.Core/Modules/Administration/LocalizationCommands.cs b/NadekoBot.Core/Modules/Administration/LocalizationCommands.cs index d91a50a8..677eff0d 100644 --- a/NadekoBot.Core/Modules/Administration/LocalizationCommands.cs +++ b/NadekoBot.Core/Modules/Administration/LocalizationCommands.cs @@ -47,6 +47,7 @@ namespace NadekoBot.Modules.Administration [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] + [Priority(0)] public async Task LanguageSet() { var cul = _localization.GetCultureInfo(Context.Guild); @@ -57,6 +58,7 @@ namespace NadekoBot.Modules.Administration [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] [RequireUserPermission(GuildPermission.Administrator)] + [Priority(1)] public async Task LanguageSet(string name) { try From 4e371275369d49146d9c19248f12df7304666bf7 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 12 Nov 2017 08:18:40 +0100 Subject: [PATCH 4/7] Possibly fix #1821 --- NadekoBot.Core/Modules/Utility/InfoCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NadekoBot.Core/Modules/Utility/InfoCommands.cs b/NadekoBot.Core/Modules/Utility/InfoCommands.cs index 96243dcc..26fca5c4 100644 --- a/NadekoBot.Core/Modules/Utility/InfoCommands.cs +++ b/NadekoBot.Core/Modules/Utility/InfoCommands.cs @@ -118,7 +118,7 @@ namespace NadekoBot.Modules.Utility [OwnerOnly] public async Task Activity(int page = 1) { - const int activityPerPage = 15; + const int activityPerPage = 10; page -= 1; if (page < 0) From 95584cba6236d124ef49cd4f237a322ec5b893fe Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 12 Nov 2017 08:43:51 +0100 Subject: [PATCH 5/7] upped version to 2.4.4 --- NadekoBot.Core/Services/Impl/StatsService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NadekoBot.Core/Services/Impl/StatsService.cs b/NadekoBot.Core/Services/Impl/StatsService.cs index d05ff01f..044cda71 100644 --- a/NadekoBot.Core/Services/Impl/StatsService.cs +++ b/NadekoBot.Core/Services/Impl/StatsService.cs @@ -21,7 +21,7 @@ namespace NadekoBot.Core.Services.Impl private readonly IBotCredentials _creds; private readonly DateTime _started; - public const string BotVersion = "2.4.3"; + public const string BotVersion = "2.4.4"; public string Author => "Kwoth#2560"; public string Library => "Discord.Net"; From c4689f267a8bc51d6cfccea412aee79c645aff53 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 14 Nov 2017 06:17:22 +0100 Subject: [PATCH 6/7] fixed #1826 --- NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonPledge.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonPledge.cs b/NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonPledge.cs index 9960039f..ae46aeaa 100644 --- a/NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonPledge.cs +++ b/NadekoBot.Core/Modules/Utility/Common/Patreon/PatreonPledge.cs @@ -7,7 +7,7 @@ public object declined_since { get; set; } public bool is_twitch_pledge { get; set; } public bool patron_pays_fees { get; set; } - public int pledge_cap_cents { get; set; } + public int? pledge_cap_cents { get; set; } } public class Address From fcc006ccc0d46c388a807b37f084a9c6232cfe54 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 14 Nov 2017 06:18:50 +0100 Subject: [PATCH 7/7] small string update --- src/NadekoBot/_strings/ResponseStrings.en-US.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/_strings/ResponseStrings.en-US.json b/src/NadekoBot/_strings/ResponseStrings.en-US.json index 12b5ba93..b40fb3eb 100644 --- a/src/NadekoBot/_strings/ResponseStrings.en-US.json +++ b/src/NadekoBot/_strings/ResponseStrings.en-US.json @@ -841,8 +841,10 @@ "xp_level_up_channel": "Congratulations {0}, You've reached level {1}!", "xp_level_up_dm": "Congratulations {0}, You've reached level {1} on {2} server!", "xp_level_up_global": "Congratulations {0}, You've reached global level {1}!", - "xp_role_reward_cleared": "Level {0} will no longer reward a role.", + "xp_role_reward_cleared": "Reaching level {0} will no longer reward a role.", "xp_role_reward_added": "Users who reach level {0} will receive {1} role.", + "xp_cur_reward_cleared": "Reaching level {0} will no longer reward any {1}.", + "xp_cur_reward_added": "Users who reach level {0} will receive {1}.", "xp_role_rewards": "Role Rewards", "xp_level_x": "Level {0}", "xp_no_role_rewards": "No role reward on this page.",