feat(bot): add new guild settings command

This commit is contained in:
Iris System 2024-11-10 15:46:36 +13:00
parent f0436332c0
commit 0473bd8f01
15 changed files with 179 additions and 15 deletions

View file

@ -18,6 +18,7 @@ public class MessageContext
public bool InBlacklist { get; }
public bool InLogBlacklist { get; }
public bool LogCleanupEnabled { get; }
public bool RequireSystemTag { get; }
public bool ProxyEnabled { get; }
public SwitchId? LastSwitch { get; }
public MemberId[] LastSwitchMembers { get; } = new MemberId[0];

View file

@ -25,6 +25,7 @@ create function message_context(account_id bigint, guild_id bigint, channel_id b
in_blacklist bool,
in_log_blacklist bool,
log_cleanup_enabled bool,
require_system_tag bool,
deny_bot_usage bool
)
@ -63,6 +64,7 @@ as $$
((channel_id = any (servers.log_blacklist))
or (thread_id = any (servers.log_blacklist))) as in_log_blacklist,
coalesce(servers.log_cleanup_enabled, false) as log_cleanup_enabled,
coalesce(servers.require_system_tag, false) as require_system_tag,
-- abuse_logs table
coalesce(abuse_logs.deny_bot_usage, false) as deny_bot_usage