I am trying to get a random image from the top 10 posts on the "memes" Reddit subreddit, but it's giving a E1101 pylint error. I seem to have done everything correctly. Here is my code:
I cant seem to find anything on this.
reddit = praw.Reddit(client_id='my client ID',
client_secret='my client secret',
user_agent='my user agent',
username='username')
@commands.command()
async def meme(self):
memes = reddit.subreddit('memes').hot()
post_to_pick = random.randint(1, 10)
for i in range(0, post_to_pick):
submission = next(x for x in memes if not x.stickied)