mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
test
This commit is contained in:
parent
63a02dfcc6
commit
9dd2503900
@ -28,7 +28,7 @@ class BotReddit():
|
||||
"""This Logs all channels known to the server"""
|
||||
def __init__(self):
|
||||
self.setup_reddit()
|
||||
self.dict = {}
|
||||
self.cache = {}
|
||||
self.header = {'User-Agent': str(UserAgent().chrome)}
|
||||
self.client_id = botconfig.SpiceBot_Reddit.client_id
|
||||
self.client_secret = botconfig.SpiceBot_Reddit.client_secret
|
||||
@ -174,6 +174,7 @@ class BotReddit():
|
||||
|
||||
try:
|
||||
subtype = self.praw.subreddit(sub).subreddit_type
|
||||
returndict["subtype"] = subtype
|
||||
except Exception as e:
|
||||
returndict["exists"] = False
|
||||
if str(e) == "received 403 HTTP response":
|
||||
@ -185,8 +186,6 @@ class BotReddit():
|
||||
else:
|
||||
returndict["error"] = str(sub + " appears to not have a type")
|
||||
return returndict
|
||||
return subtype
|
||||
|
||||
return returndict
|
||||
|
||||
def reddit_user_exists(self, user):
|
||||
|
||||
@ -12,16 +12,11 @@ import sopel_modules.SpiceBot as SpiceBot
|
||||
(?:\\/ | [^/])+
|
||||
)
|
||||
""")
|
||||
def bot_command_reddit_user(bot, trigger):
|
||||
message = SpiceBot.reddit.prerun(trigger)
|
||||
bot.osd(str(message))
|
||||
|
||||
|
||||
@sopel.module.rule(r"""(?:)r/
|
||||
(
|
||||
(?:\\/ | [^/])+
|
||||
)
|
||||
""")
|
||||
def bot_command_reddit_subreddit(bot, trigger):
|
||||
def bot_command_reddit_user(bot, trigger):
|
||||
message = SpiceBot.reddit.prerun(trigger)
|
||||
bot.osd(str(message))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user