]> git.aero2k.de Git - urlbot-v3.git/commitdiff
reduce excessive verbosity
authorThorsten S <mail@aero2k.de>
Wed, 3 Oct 2018 16:44:01 +0000 (18:44 +0200)
committerThorsten S <mail@aero2k.de>
Wed, 3 Oct 2018 16:46:00 +0000 (18:46 +0200)
distbot/plugins/plugin_help.py

index 7c5401ada039624744cd80135aa5d3c33541a1fd..ae650e1ab330c1bb81ed53481072f519aa2be693 100755 (executable)
@@ -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)