diff --git a/CHANGELOG.md b/CHANGELOG.md index 791346119..1bacf064a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ Mostly based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) except da - Fixed xp bg buy button not working, and possibly some other buttons too - Fixed shopbuy %user% placeholders and updated help text +- All .feed overloads should now work" +- `.xpexclude` should will now work with forums too. If you exclude a forum you won't be able to gain xp in any of the threads. ### Removed diff --git a/src/NadekoBot/Modules/Xp/XpService.cs b/src/NadekoBot/Modules/Xp/XpService.cs index 9643adc1a..0b9c96196 100644 --- a/src/NadekoBot/Modules/Xp/XpService.cs +++ b/src/NadekoBot/Modules/Xp/XpService.cs @@ -668,7 +668,7 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand /// private async Task ScanUserForVoiceXp(SocketGuildUser user, SocketVoiceChannel channel) { - if (UserParticipatingInVoiceChannel(user) && ShouldTrackXp(user, channel.Id)) + if (UserParticipatingInVoiceChannel(user) && ShouldTrackXp(user, channel)) await UserJoinedVoiceChannel(user); else await UserLeftVoiceChannel(user, channel); @@ -767,9 +767,12 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand } */ - private bool ShouldTrackXp(SocketGuildUser user, ulong channelId) + private bool ShouldTrackXp(SocketGuildUser user, IMessageChannel channel) { - if (_excludedChannels.TryGetValue(user.Guild.Id, out var chans) && chans.Contains(channelId)) + var channelId = channel.Id; + + if (_excludedChannels.TryGetValue(user.Guild.Id, out var chans) && (chans.Contains(channelId) + || (channel is SocketThreadChannel tc && chans.Contains(tc.ParentChannel.Id)))) return false; if (_excludedServers.Contains(user.Guild.Id)) @@ -788,7 +791,7 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand _ = Task.Run(async () => { - if (!ShouldTrackXp(user, arg.Channel.Id)) + if (!ShouldTrackXp(user, arg.Channel)) return; var xpConf = _xpConfig.Data; diff --git a/src/NadekoBot/_common/Services/Impl/YtdlOperation.cs b/src/NadekoBot/_common/Services/Impl/YtdlOperation.cs index 84a424c78..0f85f0b43 100644 --- a/src/NadekoBot/_common/Services/Impl/YtdlOperation.cs +++ b/src/NadekoBot/_common/Services/Impl/YtdlOperation.cs @@ -53,7 +53,7 @@ public class YtdlOperation } catch (Win32Exception) { - Log.Error("youtube-dl is likely not installed. " + "Please install it before running the command again"); + Log.Error("youtube-dl is likely not installed. Please install it before running the command again"); return default; } catch (Exception ex)