mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 15:09:54 -05:00
target
This commit is contained in:
parent
ea2341b65a
commit
cba592531b
@ -26,7 +26,7 @@ class BotDictCommands():
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.setup_dictcoms()
|
self.setup_dictcoms()
|
||||||
self.valid_com_types = [
|
self.valid_com_types = [
|
||||||
'simple', 'fillintheblank', 'targetintheblank', 'targetplusreason',
|
'simple', 'fillintheblank', 'target', 'targetplusreason',
|
||||||
'sayings', "readfromfile", "readfromurl",
|
'sayings', "readfromfile", "readfromurl",
|
||||||
"ascii_art", "gif", "translate", "responses",
|
"ascii_art", "gif", "translate", "responses",
|
||||||
"feeds", "search"
|
"feeds", "search"
|
||||||
@ -134,7 +134,7 @@ class BotDictCommands():
|
|||||||
|
|
||||||
# each usecase needs to know if it needs a target
|
# each usecase needs to know if it needs a target
|
||||||
if "target_required" not in list(dict_from_file[mustbe].keys()):
|
if "target_required" not in list(dict_from_file[mustbe].keys()):
|
||||||
if dict_from_file[mustbe]["type"] in ['targetintheblank', 'targetplusreason']:
|
if dict_from_file[mustbe]["type"] in ['target', 'targetplusreason']:
|
||||||
dict_from_file[mustbe]["target_required"] = True
|
dict_from_file[mustbe]["target_required"] = True
|
||||||
else:
|
else:
|
||||||
dict_from_file[mustbe]["target_required"] = False
|
dict_from_file[mustbe]["target_required"] = False
|
||||||
|
|||||||
@ -142,7 +142,7 @@ def bot_dictcom_process(bot, trigger):
|
|||||||
trigger.sb["target"] = False
|
trigger.sb["target"] = False
|
||||||
|
|
||||||
trigger.sb["success"] = True
|
trigger.sb["success"] = True
|
||||||
if trigger.sb["dict"][trigger.sb["responsekey"]]["type"] in ['simple', 'fillintheblank', "targetintheblank", 'targetplusreason', 'sayings', "readfromfile", "readfromurl", "ascii_art", "translate", "responses"]:
|
if trigger.sb["dict"][trigger.sb["responsekey"]]["type"] in ['simple', 'fillintheblank', "target", 'targetplusreason', 'sayings', "readfromfile", "readfromurl", "ascii_art", "translate", "responses"]:
|
||||||
return bot_dictcom_responses(bot, trigger)
|
return bot_dictcom_responses(bot, trigger)
|
||||||
else:
|
else:
|
||||||
command_function_run = str('bot_dictcom_' + trigger.sb["dict"][trigger.sb["responsekey"]]["type"] + '(bot, botcom)')
|
command_function_run = str('bot_dictcom_' + trigger.sb["dict"][trigger.sb["responsekey"]]["type"] + '(bot, botcom)')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user