mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
start of reddit testing
This commit is contained in:
parent
3b4943dd1e
commit
37914e1f1c
14
sopel_modules/SpiceBot/Reddit.py
Normal file
14
sopel_modules/SpiceBot/Reddit.py
Normal file
@ -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()
|
||||
@ -25,6 +25,7 @@ from .AI import *
|
||||
from .Google import *
|
||||
from .Gif import *
|
||||
from .Sherlock import *
|
||||
from .Reddit import *
|
||||
|
||||
|
||||
from .configure import *
|
||||
|
||||
27
sopel_modules/SpiceBot_Core_Commands/Reddit.py
Normal file
27
sopel_modules/SpiceBot_Core_Commands/Reddit.py
Normal file
@ -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))
|
||||
@ -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'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user