This commit is contained in:
root 2020-01-14 12:20:27 +00:00
parent cfde04e2fa
commit ab223a1420
1 changed files with 13 additions and 0 deletions

View File

@ -521,6 +521,19 @@ def romerito(bot, trigger):
silly_string = "Et tu, Romerito!"
bot.say(silly_string)
@sopel.module.commands('rotten')
def rotten(bot, trigger):
reddit = praw.Reddit(client_id=client.client_id, client_secret=client.client_secret, user_agent='asdfasdfasdfjhwrgth', username=client.username, password=client.password)
try:
sub=reddit.subreddit('4chan')
posts=sub.hot(limit=100)
n=random.randint(0,100)
for i, post in enumerate(posts):
if i==n:
bot.say(post.url)
except:
bot.say("Something something reddit's servers")
@sopel.module.commands('ryo')
def ryo(bot, trigger):
bot.say(u'https://i.imgflip.com/2nn22t.jpg')