Nederlandse Copypasta functie
This commit is contained in:
+17
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user