mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 22:16:22 +00:00
Use context for filter instead of moderation option
This commit is contained in:
1 parent
88af664e61
commit
f22003b6e0
3 files changed
+5
-4
No files matched your search
+2
-2
@@ -50,9 +50,9 @@ public class FilterHandler implements Listener {
|
||||
}
|
||||
|
||||
private boolean channelUsesFilter(ChatChannel chatChannel) {
|
||||
List<String> channels = moderation.getConfig().getStringList("filters.channels");
|
||||
Object filter = chatChannel.getContext("filter");
|
||||
|
||||
return channels.contains("*") || channels.contains(chatChannel.getKey());
|
||||
return filter instanceof Boolean && ((Boolean) filter);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,8 +18,6 @@ filters:
|
||||
# Anything in blocked-words will prevent the message from being sent at all.
|
||||
blocked-words:
|
||||
- "pineapple doesn't belong on pizza"
|
||||
channels:
|
||||
- '*' # Use '*' to mean all channels
|
||||
|
||||
clear-chat:
|
||||
# The message sent to clear chat, you probably want to leave this blank
|
||||
|
||||
Reference in new issue
Block a user