diff --git a/General.py b/General.py index 3f8f06d..3764d8a 100644 --- a/General.py +++ b/General.py @@ -76,6 +76,23 @@ class General(commands.Cog): except: print("No permission to delete message") yield from ctx.channel.send(ctx.author.mention + ' ' + post.url) + + @commands.command(pass_context=True) + @asyncio.coroutine + def kopieerpasta(self, ctx): + """ iets schattigs... """ + print(type(ctx.message.channel)) + rkopieerpasta = self.r.subreddit('kopieerpasta') + post = rkopieerpasta.top('month', limit=250) + listing = list(post) + random.shuffle(listing) + post = listing[0] + + try: + yield from ctx.message.delete() + except: + print("No permission to delete message") + yield from ctx.channel.send('**'+post.title+'**```'+post.selftext+'```') @commands.command(pass_context=True) @asyncio.coroutine