From: Thorsten Date: Thu, 4 Oct 2018 19:47:57 +0000 (+0200) Subject: actually call function when appropriate X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=f2d170e288f1db68dd2d0d33c3fa0a8a8305f3f8;p=urlbot-v3.git actually call function when appropriate --- diff --git a/distbot/plugins/plugin_help.py b/distbot/plugins/plugin_help.py index b60374f..5248baa 100644 --- a/distbot/plugins/plugin_help.py +++ b/distbot/plugins/plugin_help.py @@ -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"