From db237e9f88df9510c79ef3e9dfa379f7f515678a Mon Sep 17 00:00:00 2001 From: pocketjawa Date: Wed, 1 Mar 2017 00:01:46 -0500 Subject: [PATCH] Added SFW subreddit porn command --- helpcommand.txt | 3 ++- pocketbot.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/helpcommand.txt b/helpcommand.txt index 93569d8..bfe1a8f 100644 --- a/helpcommand.txt +++ b/helpcommand.txt @@ -12,4 +12,5 @@ **!xkcd**: Posts a random xkcd comic **!xkcd latest**: Posts the latest xkcd comic **!xkcd x**: Posts xkcd comic number x (if it exists) -**!earth** or **!earthporn**: Posts a random submission from /r/EarthPorn's top this week \ No newline at end of file +**!earth** or **!earthporn**: Posts a random submission from /r/EarthPorn's top this week +**!porn**: Posts a random link from one of the 'porn' subreddits (not actually NSFW) \ No newline at end of file diff --git a/pocketbot.py b/pocketbot.py index 1a025b2..710c15a 100644 --- a/pocketbot.py +++ b/pocketbot.py @@ -129,6 +129,16 @@ def on_message(message): earthpornr = list(earthporn) yield from client.send_message(message.channel, random.choice(earthpornr).url) + #Link some porn! (actually SFW) + elif message.content.lower().startswith('!porn'): + earthporn = reddit.subreddit('earthporn').hot(limit=5) + serverporn = reddit.subreddit('ServerPorn').hot(limit=5) + cableporn = reddit.subreddit('cableporn').hot(limit=5) + foodporn = reddit.subreddit('FoodPorn').hot(limit=5) + shittyfoodporn = reddit.subreddit('shittyfoodporn').hot(limit=5) + porn_multi_r = list(earthporn) + list(serverporn) + list(cableporn) + list(foodporn) + list(shittyfoodporn) + yield from client.send_message(message.channel, random.choice(porn_multi_r).url) + client.loop.create_task(ups_check()) client.run(token) \ No newline at end of file