aww from top posts
Trying to get aww posts from something a bit better..
This commit is contained in:
+6
-1
@@ -2,6 +2,7 @@ import asyncio
|
|||||||
import discord
|
import discord
|
||||||
import sys, os
|
import sys, os
|
||||||
import praw
|
import praw
|
||||||
|
import random
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from sympy import latex, symbols, preview, Symbol #for LaTeX images
|
from sympy import latex, symbols, preview, Symbol #for LaTeX images
|
||||||
|
|
||||||
@@ -46,7 +47,11 @@ class General(object):
|
|||||||
""" iets schattigs... """
|
""" iets schattigs... """
|
||||||
print(type(ctx.message.channel))
|
print(type(ctx.message.channel))
|
||||||
raww = self.r.subreddit('aww')
|
raww = self.r.subreddit('aww')
|
||||||
post = raww.random()
|
post = raww.top('month')
|
||||||
|
listing = list(post)
|
||||||
|
random.shuffle(listing)
|
||||||
|
post = listing.next()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
yield from ctx.message.delete()
|
yield from ctx.message.delete()
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user