Fix praw stuff
This commit is contained in:
parent
0d0c4533bd
commit
d4014a998b
|
@ -1,3 +1,4 @@
|
||||||
client.py
|
client.py
|
||||||
*.pyc
|
*.pyc
|
||||||
apikey.py
|
apikey.py
|
||||||
|
redditcredentials.py
|
||||||
|
|
28
trifling.py
28
trifling.py
|
@ -4,7 +4,7 @@ import random
|
||||||
import re
|
import re
|
||||||
import requests
|
import requests
|
||||||
import praw
|
import praw
|
||||||
from client import *
|
import client
|
||||||
from threading import Timer
|
from threading import Timer
|
||||||
|
|
||||||
@sopel.module.commands('4matter')
|
@sopel.module.commands('4matter')
|
||||||
|
@ -156,15 +156,17 @@ def hitler(bot, trigger):
|
||||||
|
|
||||||
@sopel.module.commands('hmm', 'hmmm')
|
@sopel.module.commands('hmm', 'hmmm')
|
||||||
def hmm(bot, trigger):
|
def hmm(bot, trigger):
|
||||||
# try:
|
reddit = praw.Reddit(client_id=client.client_id, client_secret=client.client_secret, user_agent='asdfasdfasdfjhwrgth', username=client.username, password=client.password)
|
||||||
sub=reddit.subreddit('hmmm')
|
|
||||||
posts=sub.new(limit=100)
|
#try:
|
||||||
n=random.randint(0,100)
|
sub=reddit.subreddit('hmmm')
|
||||||
for i, post in enumerate(posts):
|
posts=sub.new(limit=100)
|
||||||
if i==n:
|
n=random.randint(0,100)
|
||||||
bot.say(post.url)
|
for i, post in enumerate(posts):
|
||||||
# except:
|
if i==n:
|
||||||
# bot.say("Something something reddit's servers")
|
bot.say(post.url)
|
||||||
|
#except:
|
||||||
|
# bot.say("Something something reddit's servers")
|
||||||
|
|
||||||
herooptions = [
|
herooptions = [
|
||||||
"https://video.twimg.com/tweet_video/DEnItJjV0AI81CK.mp4",
|
"https://video.twimg.com/tweet_video/DEnItJjV0AI81CK.mp4",
|
||||||
|
@ -444,13 +446,9 @@ def trivia(bot, trigger):
|
||||||
bot.say("No trivia for you!")
|
bot.say("No trivia for you!")
|
||||||
|
|
||||||
|
|
||||||
reddit=praw.Reddit(client_id=client_id,
|
|
||||||
client_secret=client_secret,
|
|
||||||
user_agent='monerobux',
|
|
||||||
username=username,
|
|
||||||
password=password)
|
|
||||||
@sopel.module.commands('tinytrump')
|
@sopel.module.commands('tinytrump')
|
||||||
def tinytrump(bot, trigger):
|
def tinytrump(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:
|
try:
|
||||||
sub=reddit.subreddit('tinytrump')
|
sub=reddit.subreddit('tinytrump')
|
||||||
posts=sub.new(limit=100)
|
posts=sub.new(limit=100)
|
||||||
|
|
Loading…
Reference in New Issue