summaryrefslogtreecommitdiff
path: root/abot.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2014-07-27 19:42:33 +0200
committerjomo <github@jomo.tv>2014-07-27 19:42:33 +0200
commitb1a3a92e49b353dfa42b52b448cdbc3b27bb33f8 (patch)
tree1b135af4f422d2ebcb96e814c08923d52b2f85c3 /abot.py
parente9b0ad656b71841fa23f332ddf8eff43e5cf1986 (diff)
apply file read/save helpers
Diffstat (limited to 'abot.py')
-rw-r--r--abot.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/abot.py b/abot.py
index 27508a3..b728c59 100644
--- a/abot.py
+++ b/abot.py
@@ -1,17 +1,12 @@
-import json
from helpers import *
from re import compile as reg_compile
-answers_filename = "plugins/redstoner-utils.py.dir/files/abot.json"
-answers = []
+answers = []
def load_answers():
global answers
- try:
- answers = json.loads(open(answers_filename).read())
- except Exception, e:
- error("Failed to load answers: %s" % e)
+ answers = open_json_file("abot", [])
# compile answers
for answer in answers: