aboutsummaryrefslogtreecommitdiff
path: root/modules/tweets.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-10-03 13:22:37 +0100
committerGravatar jesopo2018-10-03 13:22:37 +0100
commit69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch)
tree11aa30f2a357f3be23ad97315dae3df051455cbe /modules/tweets.py
parentAdd a way to not add a user automatically in IRCServer.get_user (diff)
signature
Move src/Utils.py in to src/utils/, splitting functionality out in to modules of
related functionality
Diffstat (limited to 'modules/tweets.py')
-rw-r--r--modules/tweets.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/tweets.py b/modules/tweets.py
index f0aedcc4..539506b9 100644
--- a/modules/tweets.py
+++ b/modules/tweets.py
@@ -5,7 +5,7 @@
import datetime, re, time, traceback
import twitter
-from src import ModuleManager, Utils
+from src import ModuleManager, utils
REGEX_TWITTERURL = re.compile(
"https?://(?:www\.)?twitter.com/[^/]+/status/(\d+)", re.I)
@@ -16,10 +16,10 @@ class Module(ModuleManager.BaseModule):
def make_timestamp(self, s):
seconds_since = time.time() - datetime.datetime.strptime(s,
"%a %b %d %H:%M:%S %z %Y").timestamp()
- since, unit = Utils.time_unit(seconds_since)
+ since, unit = utils.time_unit(seconds_since)
return "%s %s ago" % (since, unit)
- @Utils.hook("received.command.tweet|tw")
+ @utils.hook("received.command.tweet|tw")
def tweet(self, event):
"""
:help: Get/find a tweet