From fb670b077790b9a6e0f3b562cb53c3e2f3181cfe Mon Sep 17 00:00:00 2001 From: nemunaire Date: Thu, 3 Mar 2016 19:19:25 +0100 Subject: [PATCH] New keywords class that accepts any keywords --- nemubot/hooks/keywords/__init__.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/nemubot/hooks/keywords/__init__.py b/nemubot/hooks/keywords/__init__.py index 4b6419a..95984e8 100644 --- a/nemubot/hooks/keywords/__init__.py +++ b/nemubot/hooks/keywords/__init__.py @@ -26,6 +26,27 @@ class NoKeyword(Abstract): return super().check(mkw) +class AnyKeyword(Abstract): + + def __init__(self, h): + """Class that accepts any passed keywords + + Arguments: + h -- Help string + """ + + super().__init__() + self.h = h + + + def check(self, mkw): + return super().check(mkw) + + + def help(self): + return self.h + + def reload(): import imp