def make_slur_filter(): slurs = hourai_config.load_list(hourai_config.get_config(), 'message_filter_slurs') components = [generalize_filter(s) for s in slurs] regex = f"({'|'.join(components)})" logging.info(f"Slur Filter: {regex}") return re.compile(regex)
def __init__(self, bot, *, guilds): super().__init__(bot, guilds=guilds) self.banned_guilds = set( config.load_list(bot.config, "gap_banned_servers"))
def load_list(name): return hourai_config.load_list(hourai_config.get_config(), name)