Let's try again

This commit is contained in:
NikolajDanger
2020-03-22 17:42:30 +01:00
parent 406b0f77c5
commit 58f9cc9fa7
2 changed files with 24 additions and 16 deletions

View File

@ -72,7 +72,7 @@ def lookUp(data : dict, key : str, cmd : str = ""):
return key + " doesn't exist"
def characterSheet(character : dict):
return "```**"+character["Name"]+"**\nSpecies: "+character["Species"]+"\nCareer: "+character["Career"]+"```"
return character["Name"]+"Species: "+character["Species"]+"\nCareer: "+character["Career"]
def charData(user : str,cmd : str):
with open("characters.json", "r") as f:
@ -157,7 +157,9 @@ def parseChar(user : str, cmd : str):
data[user] = newChar
with open("characters.json", "w") as f:
json.dump(data,f,indent = 4)
return "Character for " + user + " created"
return "", "Character for " + user + " created"
else:
return "", charData(user,cmd)
def lightsaberChar(user : str):
with open("characters.json", "r") as f: