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 voidBlacklist a Word.static voidBlacklist a list of words.static booleancheckBlacklist(String guildId, String word) Check if the given word is blacklisted.static booleancheckMessage(String guildId, String message) Check if the given Message contains any word that is blacklisted.getBlacklist(String guildId) Get the Blacklisted Words.static voidremoveBlacklist(String guildId, String word) Remove a word from the Blacklist.static voidremoveBlacklist(String guildId, List<String> wordList) Remove a List of words from the Blacklist.static booleanshouldModerate(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
ArrayListwith 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.
-