mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -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
|
# handling for special cases
|
||||||
posscom = spicemanip(botcom.dict['args'], 1)
|
posscom = spicemanip(botcom.dict['args'], 1)
|
||||||
bot.say(str(posscom))
|
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():
|
for command in botcom.dict["dict"].keys():
|
||||||
if command.lower() == posscom.lower():
|
if command.lower() == posscom.lower():
|
||||||
posscom = command
|
posscom = command
|
||||||
|
|||||||
@ -38,16 +38,21 @@ class Spicemanip():
|
|||||||
|
|
||||||
def core_input_handler(self):
|
def core_input_handler(self):
|
||||||
# Input needs to be a list, but don't split a word into letters
|
# 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 = []
|
self.input_list = []
|
||||||
|
return
|
||||||
if isinstance(self.inputs, list):
|
if isinstance(self.inputs, list):
|
||||||
self.input_list = list(self.inputs)
|
self.input_list = list(self.inputs)
|
||||||
|
return
|
||||||
if isinstance(self.inputs, collections.abc.KeysView):
|
if isinstance(self.inputs, collections.abc.KeysView):
|
||||||
self.input_list = list(self.inputs)
|
self.input_list = list(self.inputs)
|
||||||
|
return
|
||||||
if isinstance(self.inputs, dict):
|
if isinstance(self.inputs, dict):
|
||||||
self.input_list = list(self.inputs.keys())
|
self.input_list = list(self.inputs.keys())
|
||||||
|
return
|
||||||
if not isinstance(self.inputs, list):
|
if not isinstance(self.inputs, list):
|
||||||
self.input_list = list(self.inputs.split(" "))
|
self.input_list = list(self.inputs.split(" "))
|
||||||
|
return
|
||||||
|
|
||||||
def core_task_handler(self):
|
def core_task_handler(self):
|
||||||
|
|
||||||
@ -127,7 +132,8 @@ class Spicemanip():
|
|||||||
'incrange_minus': "string",
|
'incrange_minus': "string",
|
||||||
'excrange_plus': "string",
|
'excrange_plus': "string",
|
||||||
'excrange_minus': "string",
|
'excrange_minus': "string",
|
||||||
'count': "dict"
|
'count': "dict",
|
||||||
|
"create": "list"
|
||||||
}
|
}
|
||||||
|
|
||||||
# default return if not specified
|
# default return if not specified
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user