aww from top posts

Trying to get aww posts from something a bit better..
This commit is contained in:
Mark Hoekveen
2017-12-05 23:50:49 +01:00
parent 93593fa55c
commit 59f4e22892
+6 -1
View File
@@ -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: