fix(bot): let you blacklist any channel you can proxy in

This commit is contained in:
Petal Ladenson 2024-10-04 04:58:24 -06:00 committed by GitHub
parent f37a6f4290
commit d1dd4477d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 24 deletions

View file

@ -204,7 +204,8 @@ public class ServerConfig
var affectedChannels = new List<Channel>();
if (ctx.Match("all"))
affectedChannels = (await _cache.GetGuildChannels(ctx.Guild.Id))
.Where(x => x.Type == Channel.ChannelType.GuildText).ToList();
// All the channel types you can proxy in
.Where(x => DiscordUtils.IsValidGuildChannel(x)).ToList();
else if (!ctx.HasNext()) throw new PKSyntaxError("You must pass one or more #channels.");
else
while (ctx.HasNext())