Example #1
0
    def __init__(self, bot: Bot, _: dict):
        super(Service, self).__init__(loop=bot.loop)
        bot.add_listener(self)
        self._bot = bot

        self._ping_re = re.compile("!ping @(.*)")
        self._uptime_re = re.compile("!uptime @(.*)")
        self._kill_re = re.compile("!kill @(.*)")
        self._restart_re = re.compile("!restart @(.*)")
Example #2
0
 def __init__(self, bot: Bot, config: dict):
     super(Service, self).__init__(loop=bot.loop)
     bot.add_listener(self)
     self._bot = bot
     assert "db_file" in config, "quote_db must be configured with a distinct filename"
     self._db_file = config["db_file"]
     self._set_re = re.compile("!quote set (.*)")
     self._get_re = re.compile("!quote get (.*)")
     self._del_re = re.compile("!quote delete (.*)")
     self._find_re = re.compile("!quote find (.*)")
Example #3
0
 def __init__(self, bot: Bot, _: dict):
     super(Service, self).__init__(loop=bot.loop)
     bot.add_listener(self)
     self._bot = bot