Get original JSON data from tweepy

master
Nikola Forró 4 years ago
parent c76bab2552
commit 65b2b6d8e5

@ -140,13 +140,13 @@ class Bot(discord.Client):
else: else:
reply_to = tweet.get('in_reply_to_status_id_str') reply_to = tweet.get('in_reply_to_status_id_str')
if reply_to: if reply_to:
original = api.get_status(reply_to) original = api.get_status(reply_to)._json
if original: if original:
await channel.send(embed=self.make_twitter_embed(original)) await channel.send(embed=self.make_twitter_embed(original))
elif tweet.get('user', {}).get('verified'): elif tweet.get('user', {}).get('verified'):
reply_to = tweet.get('in_reply_to_status_id_str') reply_to = tweet.get('in_reply_to_status_id_str')
if reply_to: if reply_to:
original = api.get_status(reply_to) original = api.get_status(reply_to)._json
if original: if original:
await channel.send(embed=self.make_twitter_embed(original)) await channel.send(embed=self.make_twitter_embed(original))
else: else:

Loading…
Cancel
Save