@commands.command(aliases=["memes", "r/memes", "reddit"])
async def meme(self, ctx, subred="memes"):
msg = await ctx.send('Loading ... :Loading:')
reddit = praw.Reddit(client_id='ID',
client_secret='SECRET',
username="USERNAME",
password='PASSWORD',
user_agent='AGENT')
subreddit = reddit.subreddit(subred)
all_subs = []
top = subreddit.top(limit=350)
for submission in top:
all_subs.append(submission)
random_sub = random.choice(all_subs)
name = random_sub.title
url = random_sub.url
embed = Embed(title=f'__{name}__', colour=discord.Colour.random(),
timestamp=ctx.message.created_at, url=url)
embed.set_image(url=url)
embed.set_author(name=ctx.author.display_name, icon_url=ctx.author.avatar_url)
embed.set_footer(text=f'Bot')