aboutsummaryrefslogtreecommitdiff
path: root/Config.py
diff options
context:
space:
mode:
Diffstat (limited to 'Config.py')
-rw-r--r--Config.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Config.py b/Config.py
index 06a00378..21a144cf 100644
--- a/Config.py
+++ b/Config.py
@@ -1,7 +1,7 @@
-import json, os
+import configparser, os
class Config(object):
- def __init__(self, bot, location="bot.json"):
+ def __init__(self, bot, location="bot.conf"):
self.bot = bot
self.location = location
self.full_location = os.path.join(bot.bot_directory,
@@ -12,4 +12,6 @@ class Config(object):
def load_config(self):
if os.path.isfile(self.full_location):
with open(self.full_location) as config_file:
- self.bot.config = json.loads(config_file.read())
+ parser = configparser.ConfigParser()
+ parser.read_string(config_file.read())
+ self.bot.config = dict(parser["bot"].items())