Package de.presti.ree6.utils.others
Class ModerationUtil
java.lang.Object
de.presti.ree6.utils.others.ModerationUtil
Class to handle the moderation user behaviour.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Blacklist a Word.static void
Blacklist a list of words.static boolean
checkBlacklist
(String guildId, String word) Check if the given word is blacklisted.static boolean
checkMessage
(String guildId, String message) Check if the given Message contains any word that is blacklisted.getBlacklist
(String guildId) Get the Blacklisted Words.static void
removeBlacklist
(String guildId, String word) Remove a word from the Blacklist.static void
removeBlacklist
(String guildId, List<String> wordList) Remove a List of words from the Blacklist.static boolean
shouldModerate
(String guildId) Check if the given Server should be moderated.
-
Method Details
-
getBlacklist
Get the Blacklisted Words.- Parameters:
guildId
- the ID of the Guild.- Returns:
- an
ArrayList
with every Blacklisted word from the Guild.
-
checkMessage
Check if the given Message contains any word that is blacklisted.- Parameters:
guildId
- the ID of the Guild.message
- the Message-Content.- Returns:
- true, if there is a blacklisted for contained.
-
checkBlacklist
Check if the given word is blacklisted.- Parameters:
guildId
- the ID of the Guild.word
- the word to check.- Returns:
- true, if there is a blacklisted for contained.
-
shouldModerate
Check if the given Server should be moderated.- Parameters:
guildId
- the ID of the Guild.- Returns:
- true, if the Server should be moderated.
-
blacklist
Blacklist a Word.- Parameters:
guildId
- the ID of the Guild.word
- the Word you want to blacklist.
-
blacklist
Blacklist a list of words.- Parameters:
guildId
- the ID of the Guild.wordList
- the List of Words, which should be blacklisted.
-
removeBlacklist
Remove a word from the Blacklist.- Parameters:
guildId
- the ID of the Guild.word
- the Word that should be removed from the Blacklist.
-
removeBlacklist
Remove a List of words from the Blacklist.- Parameters:
guildId
- the ID of the Guild.wordList
- the List of Words that should be removed from the Blacklist.
-