From d5e56e110c4f5c3a2e37b9822bfdd03170e751e3 Mon Sep 17 00:00:00 2001 From: Mark Hoekveen Date: Mon, 29 Jun 2020 19:19:20 +0200 Subject: [PATCH] Nederlandse Copypasta functie --- General.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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