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 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 0d567e42..142871b1 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() @@ -132,22 +131,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")) { 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 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) 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"; diff --git a/src/NadekoBot/_strings/ResponseStrings.en-US.json b/src/NadekoBot/_strings/ResponseStrings.en-US.json index 12b5ba93..aaefa2a4 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.", @@ -923,5 +925,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