make the text more clear (squash this when merging)

This commit is contained in:
Petal Ladenson 2026-01-13 19:51:17 -07:00
parent 546a287c28
commit 7643051829
2 changed files with 26 additions and 8 deletions

View file

@ -49,7 +49,7 @@ public class ServerConfig
items.Add(new(
"suppress notifications",
"When proxied messages will have notifications suppressed (sent as `@silent` messages)",
"Under what conditions proxied messages will have notifications suppressed (sent as `@silent` messages)",
ctx.GuildConfig!.SuppressNotifications.ToUserString(),
"never"
));
@ -438,20 +438,20 @@ public class ServerConfig
if (!ctx.HasNext())
{
var msg = $"Suppressing notifications for proxied messages is currently set to **{ctx.GuildConfig!.SuppressNotifications.ToUserString()}**. Proxied messages will ";
var msg = $"Suppressing notifications for proxied messages is currently set to **{ctx.GuildConfig!.SuppressNotifications.ToUserString()}**. Proxied messages are ";
switch (ctx.GuildConfig!.SuppressNotifications)
{
case GuildConfig.SuppressCondition.Never:
msg += "never be marked as silent.";
msg += "never marked as silent.";
break;
case GuildConfig.SuppressCondition.Always:
msg += "always be marked as silent.";
msg += "always marked as silent.";
break;
case GuildConfig.SuppressCondition.Match:
msg += "be marked as silent if the trigger message was marked as silent.";
msg += "marked as silent if the trigger message was marked as silent.";
break;
case GuildConfig.SuppressCondition.Invert:
msg += "be marked as silent if the trigger message was **not** marked as silent.";
msg += "marked as silent if the trigger message was **not** marked as silent.";
break;
}
await ctx.Reply(msg);
@ -470,6 +470,24 @@ public class ServerConfig
throw new PKError("You must pass one of \"always\", \"never\", \"match\", or \"invert\" to this command.");
}
await ctx.Repository.UpdateGuild(ctx.Guild.Id, new() { SuppressNotifications = newVal });
await ctx.Reply($"Suppressing notifications for proxied messages is now set to {newVal.ToUserString()}.");
var changeMsg = $"Suppressing notifications for proxied messages is now set to {newVal.ToUserString()}. Proxied messages will ";
switch (newVal)
{
case GuildConfig.SuppressCondition.Never:
changeMsg += "never be marked as silent.";
break;
case GuildConfig.SuppressCondition.Always:
changeMsg += "always be marked as silent.";
break;
case GuildConfig.SuppressCondition.Match:
changeMsg += "be marked as silent if the trigger message was marked as silent.";
break;
case GuildConfig.SuppressCondition.Invert:
changeMsg += "be marked as silent if the trigger message was **not** marked as silent.";
break;
}
;
await ctx.Reply(changeMsg);
}
}

View file

@ -158,7 +158,7 @@ You can have a space after `pk;`, e.g. `pk;system` and `pk; system` will do the
- `pk;serverconfig log cleanup [on|off]` - Toggles whether to clean up other bots' log channels
- `pk;serverconfig invalid command error [on|off]` - Sets whether to show an error message when an unknown command is sent
- `pk;serverconfig require tag [on|off]` - Sets whether server users are required to have a system tag on proxied messages
- `pk;serverconfig suppress notifications [always|never|match|invert]` - Sets when proxied messages have push notifications suppressed (sent as `@silent` messages)
- `pk;serverconfig suppress notifications [always|never|match|invert]` - Sets under which conditions proxied messages have push notifications suppressed (sent as `@silent` messages). If set to `match` it will match the trigger message, and if set to `invert` it will be suppressed if the trigger message is not suppressed and vice versa.
- `pk;serverconfig log channel <channel>` - Designates a channel to post proxied messages to
- `pk;serverconfig log channel -clear` - Clears the currently set log channel
- `pk;serverconfig log blacklist`- Displays the current list of channels where logging is disabled