diff --git a/sopel_modules/SpiceBot/Reddit.py b/sopel_modules/SpiceBot/Reddit.py new file mode 100644 index 0000000..1cf973d --- /dev/null +++ b/sopel_modules/SpiceBot/Reddit.py @@ -0,0 +1,14 @@ +# coding=utf8 +from __future__ import unicode_literals, absolute_import, division, print_function +""" +This is the SpiceBot Reddit system. +""" + + +class BotReddit(): + """This Logs all channels known to the server""" + def __init__(self): + self.dict = {} + + +reddit = BotReddit() diff --git a/sopel_modules/SpiceBot/__init__.py b/sopel_modules/SpiceBot/__init__.py index 90787d3..fac2d5c 100644 --- a/sopel_modules/SpiceBot/__init__.py +++ b/sopel_modules/SpiceBot/__init__.py @@ -25,6 +25,7 @@ from .AI import * from .Google import * from .Gif import * from .Sherlock import * +from .Reddit import * from .configure import * diff --git a/sopel_modules/SpiceBot_Core_Commands/Reddit.py b/sopel_modules/SpiceBot_Core_Commands/Reddit.py new file mode 100644 index 0000000..b442915 --- /dev/null +++ b/sopel_modules/SpiceBot_Core_Commands/Reddit.py @@ -0,0 +1,27 @@ +# coding=utf-8 + +from __future__ import unicode_literals, absolute_import, division, print_function + +import sopel.module + +# import sopel_modules.SpiceBot as SpiceBot + + +@sopel.module.rule(r"""(?:)u/ + ( + (?:\\/ | [^/])+ + ) + """) +def bot_command_reddit_user(bot, trigger): + bot.osd(str(trigger)) + bot.osd(str(trigger.args)) + + +@sopel.module.rule(r"""(?:)r/ + ( + (?:\\/ | [^/])+ + ) + """) +def bot_command_reddit_subreddit(bot, trigger): + bot.osd(str(trigger)) + bot.osd(str(trigger.args)) diff --git a/sopel_modules/SpiceBot_Core_Commands/__init__.py b/sopel_modules/SpiceBot_Core_Commands/__init__.py index cf853c4..6ec62d5 100644 --- a/sopel_modules/SpiceBot_Core_Commands/__init__.py +++ b/sopel_modules/SpiceBot_Core_Commands/__init__.py @@ -20,6 +20,7 @@ from .Search import * from .AI import * from .Gif import * from .Sherlock import * +from .Reddit import * __author__ = 'Sam Zick' __email__ = 'sam@deathbybandaid.net'