From b2fee49f01d23999c312a25356a1c0ce1cb56a45 Mon Sep 17 00:00:00 2001 From: Nick80835 Date: Sun, 5 Apr 2020 15:27:38 -0400 Subject: [PATCH] convert spaces to underscores for reddit arguments --- ubot/modules/reddit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ubot/modules/reddit.py b/ubot/modules/reddit.py index 5cac823..b32816b 100644 --- a/ubot/modules/reddit.py +++ b/ubot/modules/reddit.py @@ -108,7 +108,7 @@ async def bodyfetcher(event, sub): @ldr.add(pattern="redi") async def redimg(event): - sub = event.pattern_match.group(1) + sub = event.pattern_match.group(1).replace(" ", "_") if sub: await imagefetcher(event, sub) @@ -118,7 +118,7 @@ async def redimg(event): @ldr.add(pattern="redt") async def redtit(event): - sub = event.pattern_match.group(1) + sub = event.pattern_match.group(1).replace(" ", "_") if sub: await titlefetcher(event, sub) @@ -128,7 +128,7 @@ async def redtit(event): @ldr.add(pattern="redb") async def redbod(event): - sub = event.pattern_match.group(1) + sub = event.pattern_match.group(1).replace(" ", "_") if sub: await bodyfetcher(event, sub)