This commit is contained in:
deathbybandaid 2019-09-20 15:43:58 -04:00
parent acf1f8ebe5
commit 70440a697b

View File

@ -439,6 +439,9 @@ def trigger_cant_run(bot, trigger, botcom, message=None):
def updatable_content(bot, botcom, trigger):
# commands that can be updated
if "updates_enabled" not in list(botcom.dict["dict"][botcom.dict["responsekey"]].keys()):
botcom.dict["dict"][botcom.dict["responsekey"]]["updates_enabled"] = False
if botcom.dict["dict"][botcom.dict["responsekey"]]["updates_enabled"]:
customresponses = []
if botcom.dict["dict"][botcom.dict["responsekey"]]["updates_enabled"] == "shared":
@ -473,12 +476,24 @@ def special_handling(botcom):
posscom = command
botcom.dict["responsekey"] = posscom
botcom = dictkey_defaults(botcom)
if botcom.dict["responsekey"] != "?default":
botcom.dict['args'] = spicemanip(botcom.dict['args'], '2+', 'list')
return botcom
def dictkey_defaults(botcom):
if botcom.dict["responsekey"] not in list(botcom.dict["dict"].keys()):
botcom.dict["dict"][botcom.dict["responsekey"]] = {}
if "selection_allowed" not in list(botcom.dict["dict"][botcom.dict["responsekey"]].keys()):
botcom.dict["dict"][botcom.dict["responsekey"]]["selection_allowed"] = True
if "responses" not in list(botcom.dict["dict"][botcom.dict["responsekey"]].keys()):
botcom.dict["dict"][botcom.dict["responsekey"]]["responses"] = []
return botcom
def trigger_hyphen_args(botcom):
hyphen_args = []