feat: add command blacklisting

This commit is contained in:
Petal Ladenson 2026-01-12 17:14:12 -07:00
parent 1cb554e9c5
commit a3aa02e779
12 changed files with 155 additions and 8 deletions

View file

@ -24,6 +24,7 @@ create function message_context(account_id bigint, guild_id bigint, channel_id b
log_channel bigint,
in_proxy_blacklist bool,
in_command_blacklist bool,
in_log_blacklist bool,
log_cleanup_enabled bool,
require_system_tag bool,
@ -61,9 +62,11 @@ as $$
system_last_switch.timestamp as last_switch_timestamp,
-- servers table
servers.log_channel as log_channel,
servers.log_channel as log_channel,
((channel_id = any (servers.proxy_blacklist))
or (thread_id = any (servers.proxy_blacklist))) as in_proxy_blacklist,
((channel_id = any (servers.command_blacklist))
or (thread_id = any (servers.command_blacklist))) as in_command_blacklist,
((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,

View file

@ -0,0 +1,6 @@
-- database version 55
-- add command blacklist option for servers
alter table servers add column command_blacklist bigint[] not null default array[]::bigint[];
update info set schema_version = 55;