aboutsummaryrefslogtreecommitdiff
path: root/modules/tweets.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-27 11:46:10 +0100
committerGravatar jesopo2018-09-27 11:46:10 +0100
commit8b0314b190b02f7e83fe0dae3c349ce4dffdcb4f (patch)
tree2481de34452598ff3d3ca579612a0fdc0dc0edc5 /modules/tweets.py
parentImplement @Utils.export, to denote an export on a module (diff)
signature
Use ModuleManager.BaseModule in more modules
Diffstat (limited to 'modules/tweets.py')
-rw-r--r--modules/tweets.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/tweets.py b/modules/tweets.py
index 8f8d2396..c41d66f9 100644
--- a/modules/tweets.py
+++ b/modules/tweets.py
@@ -5,16 +5,13 @@
import datetime, re, time, traceback
import twitter
-from src import Utils
+from src import ModuleManager, Utils
REGEX_TWITTERURL = re.compile(
"https?://(?:www\.)?twitter.com/[^/]+/status/(\d+)", re.I)
-class Module(object):
+class Module(ModuleManager.BaseModule):
_name = "Twitter"
- def __init__(self, bot, events, exports):
- self.bot = bot
- self.events = events
def make_timestamp(self, s):
seconds_since = time.time() - datetime.datetime.strptime(s,