Skip to content

Commit

Permalink
Fix miru breaking chains
Browse files Browse the repository at this point in the history
  • Loading branch information
EllieJaybee committed Mar 5, 2024
1 parent 7ce78e0 commit b1a6178
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot/plugins/reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ async def reddit(cls, ctx: crescent.Context, subreddit: str, new_: bool = True):
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
)
sub: Subreddit = await cls.preddit.subreddit(subreddit, fetch=True)
if not ctx.channel.is_nsfw and sub.over18:
if sub.over18:
if isinstance(ctx, crescent.Context) and not ctx.channel.is_nsfw:
await cls.preddit.close()
return await ctx.respond("horny 🫵", flags=hikari.MessageFlag.EPHEMERAL)
post = await sub.random()
Expand Down

0 comments on commit b1a6178

Please sign in to comment.