diff options
| author | 2018-10-03 13:22:37 +0100 | |
|---|---|---|
| committer | 2018-10-03 13:22:37 +0100 | |
| commit | 69d58eede2e9bf83aa1ed1d8fcf956efde494726 (patch) | |
| tree | 11aa30f2a357f3be23ad97315dae3df051455cbe /modules/tweets.py | |
| parent | Add 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.py | 6 |
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 |
