diff --git a/mattermost_bot/bot.py b/mattermost_bot/bot.py index 26b7d69..d8ba7ce 100644 --- a/mattermost_bot/bot.py +++ b/mattermost_bot/bot.py @@ -92,7 +92,7 @@ def get_plugins(self, category, text): def respond_to(regexp, flags=0): def wrapper(func): - PluginsManager.commands['respond_to'][re.compile(regexp, flags)] = func + PluginsManager.commands['respond_to'][re.compile(regexp, flags | re.DEBUG)] = func logger.info( 'registered respond_to plugin "%s" to "%s"', func.__name__, regexp) return func @@ -102,7 +102,7 @@ def wrapper(func): def listen_to(regexp, flags=0): def wrapper(func): - PluginsManager.commands['listen_to'][re.compile(regexp, flags)] = func + PluginsManager.commands['listen_to'][re.compile(regexp, flags | re.DEBUG)] = func logger.info( 'registered listen_to plugin "%s" to "%s"', func.__name__, regexp) return func