Made the whole thing work
This commit is contained in:
@ -23,8 +23,9 @@ def monsterFunc(content):
|
||||
print("")
|
||||
return("I don't know that monster...","","","","","")
|
||||
else:
|
||||
data = json.load(open('monsters.json', encoding = "utf8"))
|
||||
data = json.load(open('funcs/lookup/monsters.json', encoding = "utf8"))
|
||||
for monster in data:
|
||||
print("Found it!")
|
||||
if str(command) == monster["name"]:
|
||||
if monster["subtype"] != "":
|
||||
typs = (monster["type"]+" ("+monster["subtype"]+")")
|
||||
@ -112,7 +113,7 @@ def monsterFunc(content):
|
||||
def spellFunc(content):
|
||||
command = gf.cap(content.lower().replace("!spell ",""))
|
||||
print("Looking up "+command)
|
||||
data = json.load(open('spells.json', encoding = "utf8"))
|
||||
data = json.load(open('funcs/lookup/spells.json', encoding = "utf8"))
|
||||
if str(command) in data:
|
||||
print("Returning spell information")
|
||||
spell_output = ("***"+str(command)+"***\n*"+str(data[str(command)]["level"])+" level "+str(data[str(command)]["school"])+"\nCasting Time: "+str(data[str(command)]["casting_time"])+"\nRange: "+str(data[str(command)]["range"])+"\nComponents: "+str(data[str(command)]["components"])+"\nDuration: "+str(data[str(command)]["duration"])+"*\n \n"+str(data[str(command)]["description"]))
|
||||
|
Reference in New Issue
Block a user