mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
update read
This commit is contained in:
parent
cb8613d685
commit
e3a3c9773c
@ -283,13 +283,25 @@ class BotRead():
|
||||
|
||||
# check that type is set, use cases will inherit this if not set
|
||||
if "type" not in list(dict_from_file.keys()):
|
||||
dict_from_file["type"] = 'module'
|
||||
dict_from_file["type"] = dict_from_file["foldername"]
|
||||
|
||||
dict_from_file["nonstockoptions"] = ["?default"]
|
||||
for command in list(dict_from_file.keys()):
|
||||
if command not in prerun_shared.stockoptions:
|
||||
dict_from_file["nonstockoptions"].append(command)
|
||||
|
||||
ignorelist = []
|
||||
if dict_from_file["type"] == "SpiceBot_Gif":
|
||||
ignorelist.extend(["url", "query", "limit", "id", "api_id", "key", "nsfw", "sfw", "sfw", "results", "cururl", "additional_url"])
|
||||
elif dict_from_file["type"] == "SpiceBot_Search":
|
||||
ignorelist.extend(["url", "query", "additional_url"])
|
||||
elif dict_from_file["type"] == "SpiceBot_Sherlock":
|
||||
ignorelist.extend(["url", "errorType", "errorMsg", "noPeriod", "errorUrl"])
|
||||
|
||||
for ignoreitem in ignorelist:
|
||||
if ignoreitem in dict_from_file["nonstockoptions"]:
|
||||
dict_from_file["nonstockoptions"].remove(ignoreitem)
|
||||
|
||||
for specialcase in dict_from_file["nonstockoptions"]:
|
||||
|
||||
# All of the above need to be in the dict if not
|
||||
|
||||
Loading…
Reference in New Issue
Block a user