From f2d170e288f1db68dd2d0d33c3fa0a8a8305f3f8 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Thu, 4 Oct 2018 21:47:57 +0200 Subject: [PATCH] actually call function when appropriate --- distbot/plugins/plugin_help.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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" -- 2.39.2