From 8df41c749b69bd06f0af36cd810339119b85ff7f Mon Sep 17 00:00:00 2001 From: Kamal Tufekcic Date: Sun, 12 Mar 2023 05:50:35 +0000 Subject: [PATCH 1/3] Replaced CN API --- src/NadekoBot/Modules/Searches/SearchesService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Searches/SearchesService.cs b/src/NadekoBot/Modules/Searches/SearchesService.cs index e8a1201a8..eedea43a1 100644 --- a/src/NadekoBot/Modules/Searches/SearchesService.cs +++ b/src/NadekoBot/Modules/Searches/SearchesService.cs @@ -296,8 +296,8 @@ public class SearchesService : INService public async Task GetChuckNorrisJoke() { using var http = _httpFactory.CreateClient(); - var response = await http.GetStringAsync(new Uri("http://api.icndb.com/jokes/random/")); - return JObject.Parse(response)["value"]["joke"] + " 😆"; + var response = await http.GetStringAsync(new Uri("https://api.chucknorris.io/jokes/random")); + return JObject.Parse(response)["value"] + " 😆"; } public async Task GetMtgCardAsync(string search) From 42f00c08fad61d4093ea86c008b5bad275caf2ec Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 23 Mar 2023 16:13:20 +0100 Subject: [PATCH 2/3] PermRole should deny messages in threads too, closes #407 --- src/NadekoBot/Modules/Administration/Mute/MuteService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NadekoBot/Modules/Administration/Mute/MuteService.cs b/src/NadekoBot/Modules/Administration/Mute/MuteService.cs index 855dde0e9..b844fe672 100644 --- a/src/NadekoBot/Modules/Administration/Mute/MuteService.cs +++ b/src/NadekoBot/Modules/Administration/Mute/MuteService.cs @@ -19,6 +19,7 @@ public class MuteService : INService private static readonly OverwritePermissions _denyOverwrite = new(addReactions: PermValue.Deny, sendMessages: PermValue.Deny, + sendMessagesInThreads: PermValue.Deny, attachFiles: PermValue.Deny); public event Action UserMuted = delegate { }; From 5c03c5ba16f11405cced0c6d57678cc826a0cb4e Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 23 Mar 2023 16:14:45 +0100 Subject: [PATCH 3/3] .banktake had ok/error responses flipped. No functional change, closes #409 --- src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs b/src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs index a8022939e..9b6dbf611 100644 --- a/src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs +++ b/src/NadekoBot/Modules/Gambling/Bank/BankCommands.cs @@ -77,14 +77,14 @@ public partial class Gambling { if (await _bank.TakeAsync(userId, amount)) { - await ReplyErrorLocalizedAsync(strs.take_fail(N(amount), - _client.GetUser(userId)?.ToString() - ?? userId.ToString(), - CurrencySign)); + await ctx.OkAsync(); return; } - - await ctx.OkAsync(); + + await ReplyErrorLocalizedAsync(strs.take_fail(N(amount), + _client.GetUser(userId)?.ToString() + ?? userId.ToString(), + CurrencySign)); } private async Task BankAwardInternalAsync(long amount, ulong userId)