コード例 #1
0
ファイル: faq.py プロジェクト: Crashdoom/McBans---Helpbot
    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")
コード例 #2
0
ファイル: faq.py プロジェクト: UltrosBot/McBlockit---Helpbot
    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"]
コード例 #3
0
ファイル: faq.py プロジェクト: ajvpot/McBans---Helpbot
 def __init__(self, path, bot):
     self.path = path
     if not os.path.exists(path):
         os.mkdir(path)
     self.bot = bot
     self.evalObj = evalFunctions(bot)