mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +00:00
feat: add command blacklisting
This commit is contained in:
parent
1cb554e9c5
commit
a3aa02e779
12 changed files with 155 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
6
crates/migrate/data/migrations/55.sql
Normal file
6
crates/migrate/data/migrations/55.sql
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue