mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
test
This commit is contained in:
parent
fc719b6ee0
commit
046d9f7be0
@ -58,11 +58,13 @@ class BotCommands():
|
||||
self.dict['nickrules'].append(command)
|
||||
|
||||
def find_command_type(self, command):
|
||||
for commandstype in list(self.dict['commands'].keys()):
|
||||
if commandstype not in ['rule']:
|
||||
for com in list(self.dict['commands'][commandstype].keys()):
|
||||
if com.lower() == command.lower():
|
||||
return commandstype
|
||||
commandtype_list = list(self.dict['commands'].keys())
|
||||
if 'rule' in commandtype_list:
|
||||
commandtype_list.remove('rule')
|
||||
for commandstype in commandtype_list:
|
||||
for com in list(self.dict['commands'][commandstype].keys()):
|
||||
if com.lower() == command.lower():
|
||||
return commandstype
|
||||
return None
|
||||
|
||||
def get_commands_disabled(self, channel):
|
||||
|
||||
@ -28,9 +28,11 @@ def prerun(t_command_type='module'):
|
||||
# Primary command used for trigger, and a list of all words
|
||||
trigger_args, trigger_command = make_trigger_args(trigger.args[1], trigger_command_type)
|
||||
|
||||
bot.say(str(trigger_command_type))
|
||||
trigger_command_type = botcommands.find_command_type(trigger_command)
|
||||
if not trigger_command_type:
|
||||
return
|
||||
bot.say(str(trigger_command_type))
|
||||
|
||||
for comtype in [trigger_command_type, t_command_type]:
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user