Fancify Reddit Posts

This commit is contained in:
Marco Thomas
2020-08-31 14:35:37 +02:00
parent 4205fe58c7
commit 3a3b7400bb
2 changed files with 4 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ class Help(commands.Cog):
embed.add_field(name="Command Prefix", value=prefix, inline=True) embed.add_field(name="Command Prefix", value=prefix, inline=True)
embed.add_field(name="Source Code", value="[GitHub](https://github.com/crammk/aquabot)", inline=True) embed.add_field(name="Source Code", value="[GitHub](https://github.com/crammk/aquabot)", inline=True)
footer_text = "This Bot is a project by MarcMK." footer_text = "This Bot is a project by [MarcMK](https://marcmk.de)."
embed.set_footer(text=footer_text) embed.set_footer(text=footer_text)
await ctx.send(embed=embed) await ctx.send(embed=embed)

View File

@@ -32,9 +32,10 @@ class Reddit(commands.Cog):
rand_post = random.randint(1, 100) rand_post = random.randint(1, 100)
# Make sure you're not sending a pinned post # Make sure you're not sending a pinned post
for i in range(0, rand_post): for i in range(0, rand_post):
selected_post = next(x for x in posts if not x.stickied) post = next(x for x in posts if not x.stickied)
await ctx.send(selected_post.url) await ctx.send(f"> {post.title} by {post.author.name}")
await ctx.send(post.url)
# COG ENDING # COG ENDING
def setup(bot): def setup(bot):