From 369d235c518b2b84ce5e935097d3eb8f9de19c3d Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Sat, 12 Feb 2022 16:15:24 -0500 Subject: [PATCH] yrdy --- sopel_SpiceBot_Core_1/SBCore/commands/__init__.py | 8 +++++++- sopel_SpiceBot_Runtime_Nickname_Commands/__init__.py | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py b/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py index 54050dc..d655ba0 100644 --- a/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py +++ b/sopel_SpiceBot_Core_1/SBCore/commands/__init__.py @@ -10,7 +10,13 @@ class Commands(): @property def sopel_commands(self): - return self.bot.rules.get_all_commands() + commands = [] + for plugin_name, commands in self.bot.rules.get_all_commands(): + for command in commands.values(): + commands.append({ + "name": command.name + }) + return commands @property def sopel_nickname_commands(self): diff --git a/sopel_SpiceBot_Runtime_Nickname_Commands/__init__.py b/sopel_SpiceBot_Runtime_Nickname_Commands/__init__.py index c9cb110..0e283ff 100644 --- a/sopel_SpiceBot_Runtime_Nickname_Commands/__init__.py +++ b/sopel_SpiceBot_Runtime_Nickname_Commands/__init__.py @@ -18,9 +18,9 @@ def sb_test_commands(bot, trigger): def sb_test_command_groups(bot, trigger): plugin_commands = itertools.chain( - bot._rules_manager.get_all_commands(), - bot._rules_manager.get_all_action_commands(), - bot._rules_manager.get_all_nick_commands(), + bot.rules.get_all_commands(), + bot.rules.get_all_action_commands(), + bot.rules.get_all_nick_commands(), ) for plugin_name, commands in plugin_commands: