From b9f52b73d35f4f9992658b2cf1f4304d55507674 Mon Sep 17 00:00:00 2001 From: dgw Date: Tue, 16 Jun 2020 15:41:11 -0500 Subject: [PATCH] reddit: use new `find` rule type to get all slash-refs in line --- sopel/modules/reddit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sopel/modules/reddit.py b/sopel/modules/reddit.py index 38b692676a..e5db0c6a42 100644 --- a/sopel/modules/reddit.py +++ b/sopel/modules/reddit.py @@ -20,7 +20,7 @@ import requests from sopel.formatting import bold, color, colors -from sopel.module import commands, example, NOLIMIT, OP, require_chanmsg, rule, url +from sopel.module import commands, example, find, NOLIMIT, OP, require_chanmsg, url from sopel.tools import time from sopel.tools.web import USER_AGENT @@ -431,7 +431,7 @@ def get_channel_spoiler_free(bot, trigger): bot.say('%s is flagged as spoilers-allowed' % channel) -@rule(r'.*(?r|u)/(?P[a-zA-Z0-9-_]+)\b.*') +@find(r'(?r|u)/(?P[a-zA-Z0-9-_]+)\b') def reddit_slash_info(bot, trigger): searchtype = trigger.group('prefix').lower() match = trigger.group('id')