]> git.aero2k.de Git - urlbot-v3.git/commitdiff
actually call function when appropriate
authorThorsten <mail@aero2k.de>
Thu, 4 Oct 2018 19:47:57 +0000 (21:47 +0200)
committerThorsten <mail@aero2k.de>
Thu, 4 Oct 2018 19:47:57 +0000 (21:47 +0200)
distbot/plugins/plugin_help.py

index b60374f3f85857a2fb35fafb8c01d301720eb6e7..5248baaf1a83e89b7400f9070fab8e5a68afb8b3 100644 (file)
@@ -57,8 +57,10 @@ class Plugins(Worker):
         if not plugin_name:
             msg = "Known commands/reactions:\n" + ", ".join(self.plugin_storage.keys())
         else:
-            definition = self.plugin_storage.get(plugin_name.lower()) \
-                         or self.plugin_storage.get(self.reverse_lookup.get(plugin_name.lower()))
+            definition = self.plugin_storage.get(plugin_name.lower())
+            if not definition:
+                self.build_reverse_lookup()
+                definition = self.plugin_storage.get(self.reverse_lookup.get(plugin_name.lower()))
             if not definition:
                 return Action(msg="unknown command, try help")
             msg = ("{}: \n"