mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -05:00
test
This commit is contained in:
parent
b3e12f4f8a
commit
44e6448b64
@ -25,6 +25,7 @@ class BotDictCommands():
|
||||
|
||||
def __init__(self):
|
||||
self.setup_dictcoms()
|
||||
self.validprefixcoms = []
|
||||
self.header = {'User-Agent': str(UserAgent().chrome)}
|
||||
self.valid_com_types = [
|
||||
'simple', 'fillintheblank', 'targetplusreason',
|
||||
@ -92,6 +93,10 @@ class BotDictCommands():
|
||||
|
||||
botcommands.register(dict_from_file)
|
||||
|
||||
for commandtype in self.valid_com_types:
|
||||
if "prefix_" + commandtype in list(botcommands.dict['commands'].keys()):
|
||||
self.validprefixcoms.extend(list(botcommands.dict['commands']["prefix_" + commandtype].keys()))
|
||||
|
||||
def bot_dict_use_cases(self, maincom, dict_from_file, process_list):
|
||||
|
||||
for mustbe in process_list:
|
||||
|
||||
@ -14,7 +14,7 @@ import sopel_modules.SpiceBot as SpiceBot
|
||||
@sopel.module.commands('(.*)')
|
||||
def command_dictcom(bot, trigger):
|
||||
|
||||
if trigger.sb['com'] not in list(SpiceBot.commands.dict['commands']["prefix"].keys()):
|
||||
if trigger.sb['com'] not in list(SpiceBot.dictcoms.validprefixcoms):
|
||||
return
|
||||
|
||||
bot.say("here")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user