Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bot/exts/evergreen/reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ async def get_reddit(self, ctx: commands.Context, subreddit: str = 'python', sor
if not posts:
return await ctx.send('No posts available!')

if posts[1]["data"]["over_18"] is True:
if posts[0]["data"]["over_18"] is True:
return await ctx.send(
"You cannot access this Subreddit as it is ment for those who "
"You cannot access this Subreddit as it is meant for those who "
"are 18 years or older."
)

embed_titles = ""

# Chooses k unique random elements from a population sequence or set.
random_posts = random.sample(posts, k=5)
random_posts = random.sample(posts, k=min(len(posts), 5))

# -----------------------------------------------------------
# This code below is bound of change when the emojis are added.
Expand Down