📝 removed references to error codes
This commit is contained in:
@ -266,8 +266,8 @@ class StarWarsChar():
|
||||
self.bot.log("Returning a list of weapons")
|
||||
return ", ".join(list(userCharacter[key]))
|
||||
else:
|
||||
self.bot.log("The character doesn't have any weapons. Which is probably for the best. Like, who just walks around with weapons? (error code 941)")
|
||||
return "There doesn't seem to be anything there... (error code 941)"
|
||||
self.bot.log("The character doesn't have any weapons. Which is probably for the best. Like, who just walks around with weapons?")
|
||||
return "There doesn't seem to be anything there..."
|
||||
else:
|
||||
return self.setUpDict(userCharacter[key])
|
||||
elif cmd[0] == "+":
|
||||
@ -277,8 +277,8 @@ class StarWarsChar():
|
||||
while cmd[0] == ' ':
|
||||
cmd = cmd[1:]
|
||||
except:
|
||||
self.bot.log("Nope. That didn't happen (error code 942)")
|
||||
return "Can't do that (error code 942)"
|
||||
self.bot.log("Nope. That didn't happen")
|
||||
return "Can't do that"
|
||||
|
||||
if (key == "Talents" or key == "Force-powers") and "," in cmd:
|
||||
cmd = cmd.split(",")
|
||||
@ -298,8 +298,8 @@ class StarWarsChar():
|
||||
self.bot.database["starwars characters"].update_one({"_id":user},
|
||||
{"$set": {key+"."+cmd[0] : int(cmd[1])}})
|
||||
except:
|
||||
self.bot.log("Fucked that up (error code 949)")
|
||||
return "Wrong data type (error code 949)"
|
||||
self.bot.log("Fucked that up")
|
||||
return "Wrong data type"
|
||||
return cmd[0]+" added to "+key+" for " + userCharacter["Name"]
|
||||
|
||||
elif key == "Weapons":
|
||||
@ -313,8 +313,8 @@ class StarWarsChar():
|
||||
return cmd+" added to weapons for " + userCharacter["Name"]
|
||||
|
||||
else:
|
||||
self.bot.log("That's not happening (error code 947d)")
|
||||
return "Can't add that (error code 947d)"
|
||||
self.bot.log("That's not happening")
|
||||
return "Can't add that"
|
||||
|
||||
elif cmd[0] == "-":
|
||||
self.bot.log("Gonna subtract/remove something")
|
||||
@ -323,8 +323,8 @@ class StarWarsChar():
|
||||
while cmd[0] == ' ':
|
||||
cmd = cmd[1:]
|
||||
except:
|
||||
self.bot.log("AAAAAAAAAAAA (error code 948)")
|
||||
return "Can't do that (error code 948)"
|
||||
self.bot.log("AAAAAAAAAAAA ")
|
||||
return "Can't do that "
|
||||
|
||||
if key == "Talents" or key == "Force-powers" or key == "Weapons" or key == "Obligations":
|
||||
self.bot.log("Trying to remove "+cmd+" from "+key)
|
||||
@ -334,11 +334,11 @@ class StarWarsChar():
|
||||
self.bot.log("I did that")
|
||||
return cmd+" removed from "+key+" from "+userCharacter["Name"]
|
||||
else:
|
||||
self.bot.log("Welp. I fucked that up (error code 946e)")
|
||||
return "Can't remove that (error code 946e)"
|
||||
self.bot.log("Welp. I fucked that up")
|
||||
return "Can't remove that"
|
||||
else:
|
||||
self.bot.log("Urgh! (error code 946d)")
|
||||
return "Can't remove that (error code 946d)"
|
||||
self.bot.log("Urgh!")
|
||||
return "Can't remove that"
|
||||
|
||||
else:
|
||||
self.bot.log("Looking up "+cmd+" in "+key)
|
||||
@ -371,8 +371,8 @@ class StarWarsChar():
|
||||
while cmd[0] == ' ':
|
||||
cmd = cmd[1:]
|
||||
except:
|
||||
self.bot.log("Error message (error code 948)")
|
||||
return "Can't do that (error code 948)"
|
||||
self.bot.log("Error message")
|
||||
return "Can't do that"
|
||||
|
||||
if type(userCharacter[key]) is int:
|
||||
try:
|
||||
@ -381,8 +381,8 @@ class StarWarsChar():
|
||||
{"$inc": {key : int(cmd)}})
|
||||
return "Added " + cmd + " to " + userCharacter["Name"] + "'s " + key
|
||||
except:
|
||||
self.bot.log("BITCH SANDWICH (error code 947c)")
|
||||
return "Can't add that (error code 947c)"
|
||||
self.bot.log("BITCH SANDWICH")
|
||||
return "Can't add that"
|
||||
elif type(userCharacter[key]) is list:
|
||||
try:
|
||||
self.bot.log("Adding "+cmd+" to "+key)
|
||||
@ -390,11 +390,11 @@ class StarWarsChar():
|
||||
{"$push": {key : cmd}})
|
||||
return "Added " + cmd + " to " + userCharacter["Name"] + "'s " + key
|
||||
except:
|
||||
self.bot.log("tstststststs (error code 947b)")
|
||||
return "Can't add that (error code 947b)"
|
||||
self.bot.log("tstststststs")
|
||||
return "Can't add that"
|
||||
else:
|
||||
self.bot.log("Help (error code 947a)")
|
||||
return "Can't add that (error code 947a)"
|
||||
self.bot.log("Help")
|
||||
return "Can't add that"
|
||||
elif cmd[0] == '-':
|
||||
self.bot.log("Removing/subtracting")
|
||||
try:
|
||||
@ -402,8 +402,8 @@ class StarWarsChar():
|
||||
while cmd[0] == ' ':
|
||||
cmd = cmd[1:]
|
||||
except:
|
||||
self.bot.log("lalalala (error code 948)")
|
||||
return "Can't do that (error code 948)"
|
||||
self.bot.log("lalalala ")
|
||||
return "Can't do that"
|
||||
|
||||
if type(userCharacter[key]) is int:
|
||||
try:
|
||||
@ -412,8 +412,8 @@ class StarWarsChar():
|
||||
{"$inc": {key : -int(cmd)}})
|
||||
return "Subtracted " + cmd + " from " + userCharacter["Name"] + "'s " + key
|
||||
except:
|
||||
self.bot.log("Tried it. Didn't want to (error code 946c)")
|
||||
return "Can't remove that (error code 946c)"
|
||||
self.bot.log("Tried it. Didn't want to")
|
||||
return "Can't remove that"
|
||||
elif type(userCharacter[key]) is list:
|
||||
try:
|
||||
self.bot.log("removing "+cmd+" from "+key)
|
||||
@ -422,14 +422,14 @@ class StarWarsChar():
|
||||
{"$pull": {key : cmd}})
|
||||
except:
|
||||
self.bot.log("They can only remove stuff that's actually in the list")
|
||||
return "Not in list (error code 944b)"
|
||||
return "Not in list"
|
||||
return "Removed " + cmd + " from " + userCharacter["Name"] + "'s " + key
|
||||
except:
|
||||
self.bot.log("nah (error code 946b)")
|
||||
return "Can't remove that (error code 946b)"
|
||||
self.bot.log("nah")
|
||||
return "Can't remove that"
|
||||
else:
|
||||
self.bot.log("nyope (error code 946a)")
|
||||
return "Can't remove that (error code 946a)"
|
||||
self.bot.log("nyope")
|
||||
return "Can't remove that"
|
||||
else:
|
||||
self.bot.log("Changing "+key+" to "+cmd)
|
||||
if type(userCharacter[key]) is int:
|
||||
@ -437,21 +437,21 @@ class StarWarsChar():
|
||||
self.bot.database["starwars characters"].update_one({"_id":user},
|
||||
{"$set": {key : int(cmd)}})
|
||||
except:
|
||||
self.bot.log("I don't wanna tho (error code 945b)")
|
||||
return "Can't do that (error code 945b)"
|
||||
self.bot.log("I don't wanna tho")
|
||||
return "Can't do that"
|
||||
elif type(userCharacter[key]) is str:
|
||||
self.bot.database["starwars characters"].update_one({"_id":user},
|
||||
{"$set": {key : cmd}})
|
||||
else:
|
||||
self.bot.log("I don't wanna tho (error code 945a)")
|
||||
return "Can't do that (error code 945a)"
|
||||
self.bot.log("I don't wanna tho")
|
||||
return "Can't do that"
|
||||
return "Changed " + userCharacter["Name"] + "'s " + key +" to " + cmd
|
||||
else:
|
||||
self.bot.log(key+" isn't in there (error code 944)")
|
||||
return "Couldn't find that data. Are you sure you spelled it correctly? (error code 944)"
|
||||
self.bot.log(key+" isn't in there")
|
||||
return "Couldn't find that data. Are you sure you spelled it correctly?"
|
||||
else:
|
||||
self.bot.log(user+" doesn't have a character (error code 943)")
|
||||
return "You don't have a character. You can make one with /starwarscharacter (error code 943)"
|
||||
self.bot.log(user+" doesn't have a character")
|
||||
return "You don't have a character. You can make one with /starwarscharacter"
|
||||
|
||||
def replaceSpaces(self,cmd : str):
|
||||
withSpaces = ["Specialization Trees","Wound Threshold","Strain Threshold","Defense - Ranged","Defense - Melee","Force Rating","Core Worlds","Outer Rim","Piloting - Planetary","Piloting - Space","Ranged - Heavy","Ranged - Light","Lightsaber Characteristic","Critical Injuries","Force Powers"]
|
||||
|
Reference in New Issue
Block a user