mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 22:20:58 -05:00
test
This commit is contained in:
parent
7833a022c4
commit
3e66096987
@ -36,7 +36,7 @@ def bot_dictcom_process(bot, trigger, botcom):
|
||||
# handling for special cases
|
||||
posscom = spicemanip(botcom.dict['args'], 1)
|
||||
bot.say(str(posscom))
|
||||
if posscom.lower() in [str(command).lower() for command in list(botcom.dict["dict"].keys())]:
|
||||
if posscom.lower() in [command.lower() for command in list(botcom.dict["dict"].keys())]:
|
||||
for command in botcom.dict["dict"].keys():
|
||||
if command.lower() == posscom.lower():
|
||||
posscom = command
|
||||
|
||||
@ -38,16 +38,21 @@ class Spicemanip():
|
||||
|
||||
def core_input_handler(self):
|
||||
# Input needs to be a list, but don't split a word into letters
|
||||
if not self.inputs:
|
||||
if not self.inputs or not len(self.inputs):
|
||||
self.input_list = []
|
||||
return
|
||||
if isinstance(self.inputs, list):
|
||||
self.input_list = list(self.inputs)
|
||||
return
|
||||
if isinstance(self.inputs, collections.abc.KeysView):
|
||||
self.input_list = list(self.inputs)
|
||||
return
|
||||
if isinstance(self.inputs, dict):
|
||||
self.input_list = list(self.inputs.keys())
|
||||
return
|
||||
if not isinstance(self.inputs, list):
|
||||
self.input_list = list(self.inputs.split(" "))
|
||||
return
|
||||
|
||||
def core_task_handler(self):
|
||||
|
||||
@ -127,7 +132,8 @@ class Spicemanip():
|
||||
'incrange_minus': "string",
|
||||
'excrange_plus': "string",
|
||||
'excrange_minus': "string",
|
||||
'count': "dict"
|
||||
'count': "dict",
|
||||
"create": "list"
|
||||
}
|
||||
|
||||
# default return if not specified
|
||||
|
||||
Loading…
Reference in New Issue
Block a user