feat: add more options for when to make proxied messages silent

This commit is contained in:
Petal Ladenson 2026-01-13 19:26:10 -07:00
parent 952bb02285
commit 546a287c28
9 changed files with 71 additions and 14 deletions

View file

@ -9,5 +9,18 @@ public class GuildConfig
public bool LogCleanupEnabled { get; }
public bool InvalidCommandResponseEnabled { get; }
public bool RequireSystemTag { get; }
public bool SuppressNotifications { get; }
public SuppressCondition SuppressNotifications { get; }
public enum SuppressCondition
{
Never = 0,
Always = 1,
Match = 2,
Invert = 3,
}
}
public static class GuildConfigExt
{
public static string ToUserString(this GuildConfig.SuppressCondition val) => val.ToString().ToLower();
}

View file

@ -10,7 +10,7 @@ public class GuildPatch: PatchObject
public Partial<bool> LogCleanupEnabled { get; set; }
public Partial<bool> InvalidCommandResponseEnabled { get; set; }
public Partial<bool> RequireSystemTag { get; set; }
public Partial<bool> SuppressNotifications { get; set; }
public Partial<GuildConfig.SuppressCondition> SuppressNotifications { get; set; }
public override Query Apply(Query q) => q.ApplyPatch(wrapper => wrapper
.With("log_channel", LogChannel)