Skip to content

Commit 57f3105

Browse files
Added emojis to titles to fix #538
1 parent 8cde7a7 commit 57f3105

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cogs/loops/reddit.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,18 @@ async def wsb(self, reddit: asyncpraw.Reddit) -> None:
132132
or url.endswith(".gif")
133133
):
134134
img_url.append(url)
135+
title = "🖼️ " + title
135136
# If the post includes multiple images
136137
elif "gallery" in url:
137138
image_dict = submission.media_metadata
138139
for image_item in image_dict.values():
139140
largest_image = image_item["s"]
140141
img_url.append(largest_image["u"])
142+
143+
title = "📸🖼️ " + title
141144
elif "v.redd.it" in url:
142145
video = True
146+
title = "🎥 " + title
143147
if "images" in submission.preview:
144148
img_url.append(
145149
submission.preview["images"][0]["source"]["url"]
@@ -159,10 +163,6 @@ async def wsb(self, reddit: asyncpraw.Reddit) -> None:
159163
if img_url:
160164
e.set_image(url=img_url[0])
161165

162-
# Add video emoji to the title
163-
if video:
164-
e.title = "🎥 " + e.title
165-
166166
e.set_footer(
167167
text=f"🔼 {submission.score} | 💬 {submission.num_comments}",
168168
icon_url=data_sources["reddit"]["icon"],

0 commit comments

Comments
 (0)