Example #1
0
    def __init__(self, path, bot):
        self.path = path
        if not os.path.exists(path):
            os.mkdir(path)
        self.bot = bot
        self.evalObj = evalFunctions(bot)

        settings = ConfigParser()
        settings.read("config/faq.ini")

        self.config["type"] = settings.get("other", "type")
        location = settings.get("other", "location")
        if location[-1] == "/" or location[-1] == "\\":
            self.config["location"] = location
        else:
            self.config["location"] = location + "/"
        self.config["name"] = settings.get("other", "name")
        self.config["num_colours"] = settings.getint("other", "colours")
        self.config["css"] = settings.get("other", "css")

        self.config["colours"] = settings.items("colours")
Example #2
0
    def __init__(self, path, bot):
        self.path = path
        if not os.path.exists(path):
            os.mkdir(path)
        self.bot = bot
        self.evalObj = evalFunctions(bot)

        settings = yaml_loader()
        settings = settings.load("config/settings.yml")["faq"]

        self.config["type"] = settings["type"]
        location = settings["location"]
        if location[-1] == "/" or location[-1] == "\\":
            self.config["location"] = location
        else:
            self.config["location"] = location + "/"
        self.config["name"] = settings["name"]
        self.config["num_colours"] = int(settings["colours"])
        self.config["css"] = settings["css"]

        self.config["colours"] = settings["generated_colours"]
Example #3
0
 def __init__(self, path, bot):
     self.path = path
     if not os.path.exists(path):
         os.mkdir(path)
     self.bot = bot
     self.evalObj = evalFunctions(bot)