diff options
| author | 2021-04-15 20:42:14 +0530 | |
|---|---|---|
| committer | 2021-04-15 20:42:14 +0530 | |
| commit | 541efecc44fffec87f7e9346619dcae0710e2a08 (patch) | |
| tree | 15097dce54ce9b0f1e4ff69ed344560e75573b72 /bot/exts | |
| parent | Add reddit channel ID to constants. (diff) | |
Apply code review suggestions.
Diffstat (limited to 'bot/exts')
| -rw-r--r-- | bot/exts/evergreen/reddit.py | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/bot/exts/evergreen/reddit.py b/bot/exts/evergreen/reddit.py index 7f4ce6a0..916563ac 100644 --- a/bot/exts/evergreen/reddit.py +++ b/bot/exts/evergreen/reddit.py @@ -86,11 +86,11 @@ class Reddit(Cog):              author = data["author"]              content_type = Emojis.reddit_post_text -            if data["is_video"] is True or {"youtube", "youtu.be"}.issubset(set(data["url"].split("."))): +            if data["is_video"] or {"youtube", "youtu.be"}.issubset(set(data["url"].split("."))):                  # This means the content type in the post is a video.                  content_type = f"{Emojis.reddit_post_video}" -            elif any(data["url"].endswith(pic_format) for pic_format in ("jpg", "png", "gif")): +            elif data["url"].endswith(("jpg", "png", "gif")):                  # This means the content type in the post is an image.                  content_type = f"{Emojis.reddit_post_photo}"                  image_url = data["url"] | 
