From 59f4e228922c93cb0ce3e5b47f2ddec6d1d20f4b Mon Sep 17 00:00:00 2001 From: Mark Hoekveen Date: Tue, 5 Dec 2017 23:50:49 +0100 Subject: [PATCH] aww from top posts Trying to get aww posts from something a bit better.. --- General.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/General.py b/General.py index 5010928..6ae1c47 100644 --- a/General.py +++ b/General.py @@ -2,6 +2,7 @@ import asyncio import discord import sys, os import praw +import random from discord.ext import commands from sympy import latex, symbols, preview, Symbol #for LaTeX images @@ -46,7 +47,11 @@ class General(object): """ iets schattigs... """ print(type(ctx.message.channel)) raww = self.r.subreddit('aww') - post = raww.random() + post = raww.top('month') + listing = list(post) + random.shuffle(listing) + post = listing.next() + try: yield from ctx.message.delete() except: