aboutsummaryrefslogtreecommitdiff
path: root/modules/imgur.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/imgur.py')
-rw-r--r--modules/imgur.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/modules/imgur.py b/modules/imgur.py
index 2cccaac6..fd68ed00 100644
--- a/modules/imgur.py
+++ b/modules/imgur.py
@@ -28,19 +28,20 @@ class Module(ModuleManager.BaseModule):
text += "%s " % data["account_url"]
return text
- @utils.hook("command.regex", pattern=REGEX_IMAGE, ignore_action=False)
+ @utils.hook("command.regex")
+ @utils.kwarg("ignore_action", False)
+ @utils.kwarg("command", "imgur")
+ @utils.kwarg("pattern", REGEX_IMAGE)
def _regex_image(self, event):
- """
- :command: imgur
- """
if event["target"].get_setting("auto-imgur", False):
event["stdout"].write(self._parse_image(event["match"].group(1)))
event.eat()
- @utils.hook("command.regex", pattern=REGEX_GALLERY, ignore_action=False)
+
+ @utils.hook("command.regex")
+ @utils.kwarg("ignore_action", False)
+ @utils.kwarg("command", "imgur")
+ @utils.kwarg("pattern", REGEX_GALLERY)
def _regex_gallery(self, event):
- """
- :command: imgur
- """
if event["target"].get_setting("auto-imgur", False):
event["stdout"].write(self._parse_gallery(event["match"].group(1)))
event.eat()