diff --git a/jarvis/cogs/twitter.py b/jarvis/cogs/twitter.py index 63cf4f4..c4c6a42 100644 --- a/jarvis/cogs/twitter.py +++ b/jarvis/cogs/twitter.py @@ -57,11 +57,12 @@ class TwitterCog(commands.Cog): self._channel_cache[twitter.channel] = find(lambda x: x.id == twitter.channel, channels) channel = self._channel_cache[twitter.channel] for tweet in tweets: - if tweet.retweeted_status and not twitter.retweets: + retweet = "retweeted_status" in tweet.__dict__ + if retweet and not twitter.retweets: continue timestamp = int(tweet.created_at.timestamp()) url = f"https://twitter.com/{twitter.handle}/status/{tweet.id}" - verb = "re" if tweet.retweeted_status else "" + verb = "re" if retweet else "" await channel.send(f"`@{twitter.handle}` {verb}tweeted this at : {url}") newest = max(tweets, key=lambda x: x.id) twitter.last_tweet = newest.id