This commit is contained in:
deathbybandaid 2022-05-06 09:34:49 -04:00
parent 21504e5ff0
commit 3710517186

View File

@ -38,12 +38,8 @@ class Commands():
def valid_sopel_commands(self): def valid_sopel_commands(self):
found = [] found = []
for command_dict in self.sopel_commands: for command_dict in self.sopel_commands:
print(command_dict)
found.append(command_dict["name"]) found.append(command_dict["name"])
found.extend(command_dict["aliases"]) found.extend(command_dict["aliases"])
for plugin_name, commands in self.bot.rules.get_all_commands():
print(plugin_name)
print(commands)
return found return found
@property @property
@ -70,7 +66,8 @@ class Commands():
commands_list.append({ commands_list.append({
"name": command.name, "name": command.name,
"aliases": command.aliases, "aliases": command.aliases,
"type": "command" "type": "command",
"plugin_name": plugin_name
}) })
return commands_list return commands_list
@ -82,7 +79,8 @@ class Commands():
commands_list.append({ commands_list.append({
"name": command.name, "name": command.name,
"aliases": command.aliases, "aliases": command.aliases,
"type": "nickname_command" "type": "nickname_command",
"plugin_name": plugin_name
}) })
return commands_list return commands_list
@ -94,8 +92,10 @@ class Commands():
commands_list.append({ commands_list.append({
"name": command.name, "name": command.name,
"aliases": command.aliases, "aliases": command.aliases,
"type": "action_command" "type": "action_command",
"plugin_name": plugin_name
}) })
print(commands_list)
return commands_list return commands_list
def dispatch(self, trigger_dict): def dispatch(self, trigger_dict):