diff options
| author | 2018-09-09 13:20:59 +0100 | |
|---|---|---|
| committer | 2018-09-09 13:20:59 +0100 | |
| commit | 2d4dbf922f98f5b454e77c0bf8d16aa0ea65310f (patch) | |
| tree | 04b873f28c0197e8b38db306840b5342cce1e5ae /modules/tweets.py | |
| parent | WOOP WOOP THAT'S THE SOUND OF LINKS FOR TWEETS (diff) | |
| signature | ||
h8 everything right now
Diffstat (limited to 'modules/tweets.py')
| -rw-r--r-- | modules/tweets.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/tweets.py b/modules/tweets.py index 93492212..72358899 100644 --- a/modules/tweets.py +++ b/modules/tweets.py @@ -16,6 +16,7 @@ class Module(object): def __init__(self, bot, events, exports): self.bot = bot self.bitly_is_enabled = "bitly" in self.bot.modules.modules + self.events = events events.on("received").on("command").on("tweet", "tw" ).hook(self.tweet, @@ -68,12 +69,12 @@ class Module(object): bitly_link = "" if self.bitly_is_enabled: - bitly = self.bot.modules.modules["bitly"] chopped_uname = username[1:] tweet_link = "https://twitter.com/%s/status/%s" % ( chopped_uname, linked_id) - bitly_link = " -- " + bitly.shortlink(tweet_link) + bitly_link = " -- " + self.events.call("get.shortlink", + url=tweet_link) if "retweeted_status" in tweet: original_username = "@%s" % tweet["retweeted_status" |
