示例#1
0
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)
示例#2
0
 def __init__(self, bot, *, guilds):
     super().__init__(bot, guilds=guilds)
     self.banned_guilds = set(
         config.load_list(bot.config, "gap_banned_servers"))
示例#3
0
def load_list(name):
    return hourai_config.load_list(hourai_config.get_config(), name)