Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @client.command()
- async def COMMANDNAME(ctx):
- sub_submissions = reddit.subreddit('SUBREDDITNAMEHERE').hot()
- post_to_pick = random.randint(1, 20)
- for i in range(0, post_to_pick):
- submission = next(x for x in sub_submissions if not x.stickied)
- e = discord.Embed(title=f'Requested by {ctx.author}', description=f'{submission.title}', color=0xFFFFF)
- e.set_image(url=submission.url)
- await ctx.send(embed=e)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement