From df33bec0e0d22713ce2d8f059a2e95fa09bdf416 Mon Sep 17 00:00:00 2001 From: Thorsten S Date: Wed, 3 Oct 2018 18:44:01 +0200 Subject: [PATCH] reduce excessive verbosity --- distbot/plugins/plugin_help.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/distbot/plugins/plugin_help.py b/distbot/plugins/plugin_help.py index 7c5401a..ae650e1 100755 --- a/distbot/plugins/plugin_help.py +++ b/distbot/plugins/plugin_help.py @@ -52,20 +52,16 @@ class Plugins(Worker): def send_help(self, plugin_name=None): if not plugin_name: - msg = "Known commands/reactions:\n" # + ", ".join(self.plugin_storage.keys()) - for plugin, definition in self.plugin_storage.items(): - msg += ("{}: \n" - "Description:\t{}\n" - "Usage:\t{}\n" - "Bindings:\t{}\n\n").format( - plugin, - definition["description"], - definition["usage"], - definition["bindings"] - ) + msg = "Known commands/reactions:\n" + ", ".join(self.plugin_storage.keys()) else: definition = self.plugin_storage[plugin_name] - msg = "Usage: {}\n".format(definition["usage"]) + msg = ("{}: \n" + "Description:\t{}\n" + "Usage:\t{}\n\n").format( + plugin_name, + definition["description"], + definition["usage"] + ) return Action(msg=msg) -- 2.39.2