From 03c7e8f0665c1036ece49155340697aa3b2d107d Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 13 Aug 2019 13:48:03 +0100 Subject: return matching string from buffer.find() as most uses were redundantly regexing --- modules/soundcloud.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/soundcloud.py') diff --git a/modules/soundcloud.py b/modules/soundcloud.py index 5b24b28e..a91faa10 100644 --- a/modules/soundcloud.py +++ b/modules/soundcloud.py @@ -30,8 +30,7 @@ class Module(ModuleManager.BaseModule): else: last_soundcloud = event["target"].buffer.find(REGEX_SOUNDCLOUD) if last_soundcloud: - url = re.match(REGEX_SOUNDCLOUD, - last_soundcloud.message).string + url = last_soundcloud.match if not query and not url: raise utils.EventError("no search phrase provided") -- cgit v1.3.1-10-gc9f91