diff options
| author | 2019-06-26 14:37:26 +0100 | |
|---|---|---|
| committer | 2019-06-26 14:37:41 +0100 | |
| commit | c5785a2d1484a98616b0fb8b5a7cb728eb094435 (patch) | |
| tree | 470ace2c509805fb9b723592df196b4e9e0edb46 /modules/tweets/__init__.py | |
| parent | Update IRCBot `except queue.Empty` comment (diff) | |
| signature | ||
implement @utils.kwarg() magic, use it for command.regex hooks
Diffstat (limited to 'modules/tweets/__init__.py')
| -rw-r--r-- | modules/tweets/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
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) |
