From 8b0314b190b02f7e83fe0dae3c349ce4dffdcb4f Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 27 Sep 2018 11:46:10 +0100 Subject: Use ModuleManager.BaseModule in more modules --- modules/tweets.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'modules/tweets.py') 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, -- cgit v1.3.1-10-gc9f91