Class ModerationUtil

java.lang.Object
de.presti.ree6.utils.others.ModerationUtil

public class ModerationUtil extends Object
Class to handle the moderation user behaviour.
  • Method Details

    • getBlacklist

      public static List<String> getBlacklist(String guildId)
      Get the Blacklisted Words.
      Parameters:
      guildId - the ID of the Guild.
      Returns:
      an ArrayList with every Blacklisted word from the Guild.
    • checkMessage

      public static boolean checkMessage(String guildId, String message)
      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

      public static boolean checkBlacklist(String guildId, String word)
      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

      public static boolean shouldModerate(String guildId)
      Check if the given Server should be moderated.
      Parameters:
      guildId - the ID of the Guild.
      Returns:
      true, if the Server should be moderated.
    • blacklist

      public static void blacklist(String guildId, String word)
      Blacklist a Word.
      Parameters:
      guildId - the ID of the Guild.
      word - the Word you want to blacklist.
    • blacklist

      public static void blacklist(String guildId, List<String> wordList)
      Blacklist a list of words.
      Parameters:
      guildId - the ID of the Guild.
      wordList - the List of Words, which should be blacklisted.
    • removeBlacklist

      public static void removeBlacklist(String guildId, String word)
      Remove a word from the Blacklist.
      Parameters:
      guildId - the ID of the Guild.
      word - the Word that should be removed from the Blacklist.
    • removeBlacklist

      public static void removeBlacklist(String guildId, List<String> wordList)
      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.