From c5785a2d1484a98616b0fb8b5a7cb728eb094435 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 26 Jun 2019 14:37:26 +0100 Subject: implement @utils.kwarg() magic, use it for command.regex hooks --- modules/tweets/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/tweets/__init__.py') diff --git a/modules/tweets/__init__.py b/modules/tweets/__init__.py index 16f179d8..e58dbb6a 100644 --- a/modules/tweets/__init__.py +++ b/modules/tweets/__init__.py @@ -167,11 +167,11 @@ class Module(ModuleManager.BaseModule): else: event["stderr"].write("No tweet provided to get information about") - @utils.hook("command.regex", pattern=REGEX_TWITTERURL, ignore_action=False) + @utils.hook("command.regex") + @utils.kwarg("ignore_action", False) + @utils.kwarg("command", "tweet") + @utils.kwarg("pattern", REGEX_TWITTERURL) def regex(self, event): - """ - :command: tweet - """ if event["target"].get_setting("auto-tweet", False): event.eat() tweet_id = event["match"].group(1) -- cgit v1.3.1-10-gc9f91